| Files: | 63 |
|---|---|
| Lines: | 25827 |
| Covered: | 332 / 720 (46.1%) |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity ^0.8.0; |
||
| 3 | |||
| 4 |
abstract contract Asserts {
|
||
| 5 |
function gt(uint256 a, uint256 b, string memory reason) internal virtual; |
||
| 6 | |||
| 7 |
function gte(uint256 a, uint256 b, string memory reason) internal virtual; |
||
| 8 | |||
| 9 |
function lt(uint256 a, uint256 b, string memory reason) internal virtual; |
||
| 10 | |||
| 11 |
function lte(uint256 a, uint256 b, string memory reason) internal virtual; |
||
| 12 | |||
| 13 |
function eq(uint256 a, uint256 b, string memory reason) internal virtual; |
||
| 14 | |||
| 15 |
function t(bool b, string memory reason) internal virtual; |
||
| 16 | |||
| 17 |
function between(uint256 value, uint256 low, uint256 high) internal virtual returns (uint256); |
||
| 18 | |||
| 19 |
function between(int256 value, int256 low, int256 high) internal virtual returns (int256); |
||
| 20 | |||
| 21 |
function precondition(bool p) internal virtual; |
||
| 22 |
} |
||
| 23 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity ^0.8.0; |
||
| 3 | |||
| 4 |
import {BaseSetup} from "./BaseSetup.sol";
|
||
| 5 | |||
| 6 |
abstract contract BaseProperties is BaseSetup {}
|
||
| 7 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity ^0.8.0; |
||
| 3 | |||
| 4 |
abstract contract BaseSetup {
|
||
| 5 |
function setup() internal virtual; |
||
| 6 |
} |
||
| 7 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity ^0.8.0; |
||
| 3 | |||
| 4 |
import {BaseProperties} from "./BaseProperties.sol";
|
||
| 5 |
import {Asserts} from "./Asserts.sol";
|
||
| 6 | |||
| 7 |
abstract contract BaseTargetFunctions is BaseProperties, Asserts {}
|
||
| 8 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity ^0.8.0; |
||
| 3 | |||
| 4 |
import {Asserts} from "./Asserts.sol";
|
||
| 5 | |||
| 6 |
contract CryticAsserts is Asserts {
|
||
| 7 |
event Log(string); |
||
| 8 | |||
| 9 |
function gt(uint256 a, uint256 b, string memory reason) internal virtual override {
|
||
| 10 |
emit Log(reason); |
||
| 11 |
assert(a > b); |
||
| 12 |
} |
||
| 13 | |||
| 14 |
function gte(uint256 a, uint256 b, string memory reason) internal virtual override {
|
||
| 15 |
emit Log(reason); |
||
| 16 |
assert(a >= b); |
||
| 17 |
} |
||
| 18 | |||
| 19 |
function lt(uint256 a, uint256 b, string memory reason) internal virtual override {
|
||
| 20 |
emit Log(reason); |
||
| 21 |
assert(a < b); |
||
| 22 |
} |
||
| 23 | |||
| 24 |
function lte(uint256 a, uint256 b, string memory reason) internal virtual override {
|
||
| 25 |
emit Log(reason); |
||
| 26 |
assert(a <= b); |
||
| 27 |
} |
||
| 28 | |||
| 29 |
function eq(uint256 a, uint256 b, string memory reason) internal virtual override {
|
||
| 30 |
emit Log(reason); |
||
| 31 |
assert(a == b); |
||
| 32 |
} |
||
| 33 | |||
| 34 |
function t(bool b, string memory reason) internal virtual override {
|
||
| 35 |
emit Log(reason); |
||
| 36 |
assert(b); |
||
| 37 |
} |
||
| 38 | |||
| 39 |
function between(uint256 value, uint256 low, uint256 high) internal virtual override returns (uint256) {
|
||
| 40 |
if (value < low || value > high) {
|
||
| 41 |
uint256 ans = low + (value % (high - low + 1)); |
||
| 42 |
return ans; |
||
| 43 |
} |
||
| 44 |
return value; |
||
| 45 |
} |
||
| 46 | |||
| 47 |
function between(int256 value, int256 low, int256 high) internal virtual override returns (int256) {
|
||
| 48 |
if (value < low || value > high) {
|
||
| 49 |
int256 range = high - low + 1; |
||
| 50 |
int256 clamped = (value - low) % (range); |
||
| 51 |
if (clamped < 0) clamped += range; |
||
| 52 |
int256 ans = low + clamped; |
||
| 53 |
return ans; |
||
| 54 |
} |
||
| 55 |
return value; |
||
| 56 |
} |
||
| 57 | |||
| 58 |
function precondition(bool p) internal virtual override {
|
||
| 59 |
require(p); |
||
| 60 |
} |
||
| 61 |
} |
||
| 62 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity ^0.8.0; |
||
| 3 | |||
| 4 |
import {Test} from "forge-std/Test.sol";
|
||
| 5 |
import {Asserts} from "./Asserts.sol";
|
||
| 6 | |||
| 7 |
contract FoundryAsserts is Test, Asserts {
|
||
| 8 |
function gt(uint256 a, uint256 b, string memory reason) internal virtual override {
|
||
| 9 |
assertGt(a, b, reason); |
||
| 10 |
} |
||
| 11 | |||
| 12 |
function gte(uint256 a, uint256 b, string memory reason) internal virtual override {
|
||
| 13 |
assertGe(a, b, reason); |
||
| 14 |
} |
||
| 15 | |||
| 16 |
function lt(uint256 a, uint256 b, string memory reason) internal virtual override {
|
||
| 17 |
assertLt(a, b, reason); |
||
| 18 |
} |
||
| 19 | |||
| 20 |
function lte(uint256 a, uint256 b, string memory reason) internal virtual override {
|
||
| 21 |
assertLe(a, b, reason); |
||
| 22 |
} |
||
| 23 | |||
| 24 |
function eq(uint256 a, uint256 b, string memory reason) internal virtual override {
|
||
| 25 |
assertEq(a, b, reason); |
||
| 26 |
} |
||
| 27 | |||
| 28 |
function t(bool b, string memory reason) internal virtual override {
|
||
| 29 |
assertTrue(b, reason); |
||
| 30 |
} |
||
| 31 | |||
| 32 |
function between(uint256 value, uint256 low, uint256 high) internal virtual override returns (uint256) {
|
||
| 33 |
if (value < low || value > high) {
|
||
| 34 |
uint256 ans = low + (value % (high - low + 1)); |
||
| 35 |
return ans; |
||
| 36 |
} |
||
| 37 |
return value; |
||
| 38 |
} |
||
| 39 | |||
| 40 |
function between(int256 value, int256 low, int256 high) internal virtual override returns (int256) {
|
||
| 41 |
if (value < low || value > high) {
|
||
| 42 |
int256 range = high - low + 1; |
||
| 43 |
int256 clamped = (value - low) % (range); |
||
| 44 |
if (clamped < 0) clamped += range; |
||
| 45 |
int256 ans = low + clamped; |
||
| 46 |
return ans; |
||
| 47 |
} |
||
| 48 |
return value; |
||
| 49 |
} |
||
| 50 | |||
| 51 |
function precondition(bool p) internal virtual override {
|
||
| 52 |
vm.assume(p); |
||
| 53 |
} |
||
| 54 |
} |
||
| 55 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity ^0.8.0; |
||
| 3 | |||
| 4 |
interface IHevm {
|
||
| 5 |
// Set block.timestamp to newTimestamp |
||
| 6 |
function warp(uint256 newTimestamp) external; |
||
| 7 | |||
| 8 |
// Set block.number to newNumber |
||
| 9 |
function roll(uint256 newNumber) external; |
||
| 10 | |||
| 11 |
// Loads a storage slot from an address |
||
| 12 |
function load(address where, bytes32 slot) external returns (bytes32); |
||
| 13 | |||
| 14 |
// Stores a value to an address' storage slot |
||
| 15 |
function store(address where, bytes32 slot, bytes32 value) external; |
||
| 16 | |||
| 17 |
// Signs data (privateKey, digest) => (r, v, s) |
||
| 18 |
function sign(uint256 privateKey, bytes32 digest) external returns (uint8 r, bytes32 v, bytes32 s); |
||
| 19 | |||
| 20 |
// Gets address for a given private key |
||
| 21 |
function addr(uint256 privateKey) external returns (address account); |
||
| 22 | |||
| 23 |
// Performs a foreign function call via terminal |
||
| 24 |
function ffi(string[] calldata inputs) external returns (bytes memory result); |
||
| 25 | |||
| 26 |
// Performs the next smart contract call with specified `msg.sender` |
||
| 27 |
function prank(address newSender) external; |
||
| 28 |
} |
||
| 29 | |||
| 30 |
IHevm constant vm = IHevm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); |
||
| 31 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
import {StdStorage} from "./StdStorage.sol";
|
||
| 5 |
import {Vm, VmSafe} from "./Vm.sol";
|
||
| 6 | |||
| 7 |
abstract contract CommonBase {
|
||
| 8 |
// Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D. |
||
| 9 |
address internal constant VM_ADDRESS = address(uint160(uint256(keccak256("hevm cheat code"))));
|
||
| 10 |
// console.sol and console2.sol work by executing a staticcall to this address. |
||
| 11 |
address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67; |
||
| 12 |
// Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy. |
||
| 13 |
address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C; |
||
| 14 |
// Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38. |
||
| 15 |
address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256("foundry default caller"))));
|
||
| 16 |
// Address of the test contract, deployed by the DEFAULT_SENDER. |
||
| 17 |
address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f; |
||
| 18 |
// Deterministic deployment address of the Multicall3 contract. |
||
| 19 |
address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11; |
||
| 20 |
// The order of the secp256k1 curve. |
||
| 21 |
uint256 internal constant SECP256K1_ORDER = |
||
| 22 |
115792089237316195423570985008687907852837564279074904382605163141518161494337; |
||
| 23 | |||
| 24 |
uint256 internal constant UINT256_MAX = |
||
| 25 |
115792089237316195423570985008687907853269984665640564039457584007913129639935; |
||
| 26 | |||
| 27 |
Vm internal constant vm = Vm(VM_ADDRESS); |
||
| 28 |
StdStorage internal stdstore; |
||
| 29 |
} |
||
| 30 | |||
| 31 |
abstract contract TestBase is CommonBase {}
|
||
| 32 | |||
| 33 |
abstract contract ScriptBase is CommonBase {
|
||
| 34 |
VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS); |
||
| 35 |
} |
||
| 36 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
// 💬 ABOUT |
||
| 5 |
// Forge Std's default Script. |
||
| 6 | |||
| 7 |
// 🧩 MODULES |
||
| 8 |
import {console} from "./console.sol";
|
||
| 9 |
import {console2} from "./console2.sol";
|
||
| 10 |
import {safeconsole} from "./safeconsole.sol";
|
||
| 11 |
import {StdChains} from "./StdChains.sol";
|
||
| 12 |
import {StdCheatsSafe} from "./StdCheats.sol";
|
||
| 13 |
import {stdJson} from "./StdJson.sol";
|
||
| 14 |
import {stdMath} from "./StdMath.sol";
|
||
| 15 |
import {StdStorage, stdStorageSafe} from "./StdStorage.sol";
|
||
| 16 |
import {StdStyle} from "./StdStyle.sol";
|
||
| 17 |
import {StdUtils} from "./StdUtils.sol";
|
||
| 18 |
import {VmSafe} from "./Vm.sol";
|
||
| 19 | |||
| 20 |
// 📦 BOILERPLATE |
||
| 21 |
import {ScriptBase} from "./Base.sol";
|
||
| 22 | |||
| 23 |
// ⭐️ SCRIPT |
||
| 24 |
abstract contract Script is ScriptBase, StdChains, StdCheatsSafe, StdUtils {
|
||
| 25 |
// Note: IS_SCRIPT() must return true. |
||
| 26 |
bool public IS_SCRIPT = true; |
||
| 27 |
} |
||
| 28 |
| Lines covered: | 0 / 5 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 |
pragma experimental ABIEncoderV2; |
||
| 4 | |||
| 5 |
import {Vm} from "./Vm.sol";
|
||
| 6 | |||
| 7 |
abstract contract StdAssertions {
|
||
| 8 |
Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code")))));
|
||
| 9 | |||
| 10 |
event log(string); |
||
| 11 |
event logs(bytes); |
||
| 12 | |||
| 13 |
event log_address(address); |
||
| 14 |
event log_bytes32(bytes32); |
||
| 15 |
event log_int(int256); |
||
| 16 |
event log_uint(uint256); |
||
| 17 |
event log_bytes(bytes); |
||
| 18 |
event log_string(string); |
||
| 19 | |||
| 20 |
event log_named_address(string key, address val); |
||
| 21 |
event log_named_bytes32(string key, bytes32 val); |
||
| 22 |
event log_named_decimal_int(string key, int256 val, uint256 decimals); |
||
| 23 |
event log_named_decimal_uint(string key, uint256 val, uint256 decimals); |
||
| 24 |
event log_named_int(string key, int256 val); |
||
| 25 |
event log_named_uint(string key, uint256 val); |
||
| 26 |
event log_named_bytes(string key, bytes val); |
||
| 27 |
event log_named_string(string key, string val); |
||
| 28 | |||
| 29 |
event log_array(uint256[] val); |
||
| 30 |
event log_array(int256[] val); |
||
| 31 |
event log_array(address[] val); |
||
| 32 |
event log_named_array(string key, uint256[] val); |
||
| 33 |
event log_named_array(string key, int256[] val); |
||
| 34 |
event log_named_array(string key, address[] val); |
||
| 35 | |||
| 36 |
bool private _failed; |
||
| 37 | |||
| 38 |
function failed() public view returns (bool) {
|
||
| 39 |
if (_failed) {
|
||
| 40 |
return _failed; |
||
| 41 |
} else {
|
||
| 42 |
return vm.load(address(vm), bytes32("failed")) != bytes32(0);
|
||
| 43 |
} |
||
| 44 |
} |
||
| 45 | |||
| 46 |
function fail() internal virtual {
|
||
| 47 |
vm.store(address(vm), bytes32("failed"), bytes32(uint256(1)));
|
||
| 48 |
_failed = true; |
||
| 49 |
} |
||
| 50 | |||
| 51 |
function assertTrue(bool data) internal pure virtual {
|
||
| 52 |
vm.assertTrue(data); |
||
| 53 |
} |
||
| 54 | |||
| 55 |
function assertTrue(bool data, string memory err) internal pure virtual {
|
||
| 56 |
vm.assertTrue(data, err); |
||
| 57 |
} |
||
| 58 | |||
| 59 |
function assertFalse(bool data) internal pure virtual {
|
||
| 60 |
vm.assertFalse(data); |
||
| 61 |
} |
||
| 62 | |||
| 63 |
function assertFalse(bool data, string memory err) internal pure virtual {
|
||
| 64 |
vm.assertFalse(data, err); |
||
| 65 |
} |
||
| 66 | |||
| 67 |
function assertEq(bool left, bool right) internal pure virtual {
|
||
| 68 |
vm.assertEq(left, right); |
||
| 69 |
} |
||
| 70 | |||
| 71 |
function assertEq(bool left, bool right, string memory err) internal pure virtual {
|
||
| 72 |
vm.assertEq(left, right, err); |
||
| 73 |
} |
||
| 74 | |||
| 75 |
function assertEq(uint256 left, uint256 right) internal pure virtual {
|
||
| 76 |
vm.assertEq(left, right); |
||
| 77 |
} |
||
| 78 | |||
| 79 |
function assertEq(uint256 left, uint256 right, string memory err) internal pure virtual {
|
||
| 80 |
vm.assertEq(left, right, err); |
||
| 81 |
} |
||
| 82 | |||
| 83 |
function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
|
||
| 84 |
vm.assertEqDecimal(left, right, decimals); |
||
| 85 |
} |
||
| 86 | |||
| 87 |
function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 88 |
vm.assertEqDecimal(left, right, decimals, err); |
||
| 89 |
} |
||
| 90 | |||
| 91 |
function assertEq(int256 left, int256 right) internal pure virtual {
|
||
| 92 |
vm.assertEq(left, right); |
||
| 93 |
} |
||
| 94 | |||
| 95 |
function assertEq(int256 left, int256 right, string memory err) internal pure virtual {
|
||
| 96 |
vm.assertEq(left, right, err); |
||
| 97 |
} |
||
| 98 | |||
| 99 |
function assertEqDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
|
||
| 100 |
vm.assertEqDecimal(left, right, decimals); |
||
| 101 |
} |
||
| 102 | |||
| 103 |
function assertEqDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 104 |
vm.assertEqDecimal(left, right, decimals, err); |
||
| 105 |
} |
||
| 106 | |||
| 107 |
function assertEq(address left, address right) internal pure virtual {
|
||
| 108 |
vm.assertEq(left, right); |
||
| 109 |
} |
||
| 110 | |||
| 111 |
function assertEq(address left, address right, string memory err) internal pure virtual {
|
||
| 112 |
vm.assertEq(left, right, err); |
||
| 113 |
} |
||
| 114 | |||
| 115 |
function assertEq(bytes32 left, bytes32 right) internal pure virtual {
|
||
| 116 |
vm.assertEq(left, right); |
||
| 117 |
} |
||
| 118 | |||
| 119 |
function assertEq(bytes32 left, bytes32 right, string memory err) internal pure virtual {
|
||
| 120 |
vm.assertEq(left, right, err); |
||
| 121 |
} |
||
| 122 | |||
| 123 |
function assertEq32(bytes32 left, bytes32 right) internal pure virtual {
|
||
| 124 |
assertEq(left, right); |
||
| 125 |
} |
||
| 126 | |||
| 127 |
function assertEq32(bytes32 left, bytes32 right, string memory err) internal pure virtual {
|
||
| 128 |
assertEq(left, right, err); |
||
| 129 |
} |
||
| 130 | |||
| 131 |
function assertEq(string memory left, string memory right) internal pure virtual {
|
||
| 132 |
vm.assertEq(left, right); |
||
| 133 |
} |
||
| 134 | |||
| 135 |
function assertEq(string memory left, string memory right, string memory err) internal pure virtual {
|
||
| 136 |
vm.assertEq(left, right, err); |
||
| 137 |
} |
||
| 138 | |||
| 139 |
function assertEq(bytes memory left, bytes memory right) internal pure virtual {
|
||
| 140 |
vm.assertEq(left, right); |
||
| 141 |
} |
||
| 142 | |||
| 143 |
function assertEq(bytes memory left, bytes memory right, string memory err) internal pure virtual {
|
||
| 144 |
vm.assertEq(left, right, err); |
||
| 145 |
} |
||
| 146 | |||
| 147 |
function assertEq(bool[] memory left, bool[] memory right) internal pure virtual {
|
||
| 148 |
vm.assertEq(left, right); |
||
| 149 |
} |
||
| 150 | |||
| 151 |
function assertEq(bool[] memory left, bool[] memory right, string memory err) internal pure virtual {
|
||
| 152 |
vm.assertEq(left, right, err); |
||
| 153 |
} |
||
| 154 | |||
| 155 |
function assertEq(uint256[] memory left, uint256[] memory right) internal pure virtual {
|
||
| 156 |
vm.assertEq(left, right); |
||
| 157 |
} |
||
| 158 | |||
| 159 |
function assertEq(uint256[] memory left, uint256[] memory right, string memory err) internal pure virtual {
|
||
| 160 |
vm.assertEq(left, right, err); |
||
| 161 |
} |
||
| 162 | |||
| 163 |
function assertEq(int256[] memory left, int256[] memory right) internal pure virtual {
|
||
| 164 |
vm.assertEq(left, right); |
||
| 165 |
} |
||
| 166 | |||
| 167 |
function assertEq(int256[] memory left, int256[] memory right, string memory err) internal pure virtual {
|
||
| 168 |
vm.assertEq(left, right, err); |
||
| 169 |
} |
||
| 170 | |||
| 171 |
function assertEq(address[] memory left, address[] memory right) internal pure virtual {
|
||
| 172 |
vm.assertEq(left, right); |
||
| 173 |
} |
||
| 174 | |||
| 175 |
function assertEq(address[] memory left, address[] memory right, string memory err) internal pure virtual {
|
||
| 176 |
vm.assertEq(left, right, err); |
||
| 177 |
} |
||
| 178 | |||
| 179 |
function assertEq(bytes32[] memory left, bytes32[] memory right) internal pure virtual {
|
||
| 180 |
vm.assertEq(left, right); |
||
| 181 |
} |
||
| 182 | |||
| 183 |
function assertEq(bytes32[] memory left, bytes32[] memory right, string memory err) internal pure virtual {
|
||
| 184 |
vm.assertEq(left, right, err); |
||
| 185 |
} |
||
| 186 | |||
| 187 |
function assertEq(string[] memory left, string[] memory right) internal pure virtual {
|
||
| 188 |
vm.assertEq(left, right); |
||
| 189 |
} |
||
| 190 | |||
| 191 |
function assertEq(string[] memory left, string[] memory right, string memory err) internal pure virtual {
|
||
| 192 |
vm.assertEq(left, right, err); |
||
| 193 |
} |
||
| 194 | |||
| 195 |
function assertEq(bytes[] memory left, bytes[] memory right) internal pure virtual {
|
||
| 196 |
vm.assertEq(left, right); |
||
| 197 |
} |
||
| 198 | |||
| 199 |
function assertEq(bytes[] memory left, bytes[] memory right, string memory err) internal pure virtual {
|
||
| 200 |
vm.assertEq(left, right, err); |
||
| 201 |
} |
||
| 202 | |||
| 203 |
// Legacy helper |
||
| 204 |
function assertEqUint(uint256 left, uint256 right) internal pure virtual {
|
||
| 205 |
assertEq(left, right); |
||
| 206 |
} |
||
| 207 | |||
| 208 |
function assertNotEq(bool left, bool right) internal pure virtual {
|
||
| 209 |
vm.assertNotEq(left, right); |
||
| 210 |
} |
||
| 211 | |||
| 212 |
function assertNotEq(bool left, bool right, string memory err) internal pure virtual {
|
||
| 213 |
vm.assertNotEq(left, right, err); |
||
| 214 |
} |
||
| 215 | |||
| 216 |
function assertNotEq(uint256 left, uint256 right) internal pure virtual {
|
||
| 217 |
vm.assertNotEq(left, right); |
||
| 218 |
} |
||
| 219 | |||
| 220 |
function assertNotEq(uint256 left, uint256 right, string memory err) internal pure virtual {
|
||
| 221 |
vm.assertNotEq(left, right, err); |
||
| 222 |
} |
||
| 223 | |||
| 224 |
function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
|
||
| 225 |
vm.assertNotEqDecimal(left, right, decimals); |
||
| 226 |
} |
||
| 227 | |||
| 228 |
function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) |
||
| 229 |
internal |
||
| 230 |
pure |
||
| 231 |
virtual |
||
| 232 |
{
|
||
| 233 |
vm.assertNotEqDecimal(left, right, decimals, err); |
||
| 234 |
} |
||
| 235 | |||
| 236 |
function assertNotEq(int256 left, int256 right) internal pure virtual {
|
||
| 237 |
vm.assertNotEq(left, right); |
||
| 238 |
} |
||
| 239 | |||
| 240 |
function assertNotEq(int256 left, int256 right, string memory err) internal pure virtual {
|
||
| 241 |
vm.assertNotEq(left, right, err); |
||
| 242 |
} |
||
| 243 | |||
| 244 |
function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
|
||
| 245 |
vm.assertNotEqDecimal(left, right, decimals); |
||
| 246 |
} |
||
| 247 | |||
| 248 |
function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 249 |
vm.assertNotEqDecimal(left, right, decimals, err); |
||
| 250 |
} |
||
| 251 | |||
| 252 |
function assertNotEq(address left, address right) internal pure virtual {
|
||
| 253 |
vm.assertNotEq(left, right); |
||
| 254 |
} |
||
| 255 | |||
| 256 |
function assertNotEq(address left, address right, string memory err) internal pure virtual {
|
||
| 257 |
vm.assertNotEq(left, right, err); |
||
| 258 |
} |
||
| 259 | |||
| 260 |
function assertNotEq(bytes32 left, bytes32 right) internal pure virtual {
|
||
| 261 |
vm.assertNotEq(left, right); |
||
| 262 |
} |
||
| 263 | |||
| 264 |
function assertNotEq(bytes32 left, bytes32 right, string memory err) internal pure virtual {
|
||
| 265 |
vm.assertNotEq(left, right, err); |
||
| 266 |
} |
||
| 267 | |||
| 268 |
function assertNotEq32(bytes32 left, bytes32 right) internal pure virtual {
|
||
| 269 |
assertNotEq(left, right); |
||
| 270 |
} |
||
| 271 | |||
| 272 |
function assertNotEq32(bytes32 left, bytes32 right, string memory err) internal pure virtual {
|
||
| 273 |
assertNotEq(left, right, err); |
||
| 274 |
} |
||
| 275 | |||
| 276 |
function assertNotEq(string memory left, string memory right) internal pure virtual {
|
||
| 277 |
vm.assertNotEq(left, right); |
||
| 278 |
} |
||
| 279 | |||
| 280 |
function assertNotEq(string memory left, string memory right, string memory err) internal pure virtual {
|
||
| 281 |
vm.assertNotEq(left, right, err); |
||
| 282 |
} |
||
| 283 | |||
| 284 |
function assertNotEq(bytes memory left, bytes memory right) internal pure virtual {
|
||
| 285 |
vm.assertNotEq(left, right); |
||
| 286 |
} |
||
| 287 | |||
| 288 |
function assertNotEq(bytes memory left, bytes memory right, string memory err) internal pure virtual {
|
||
| 289 |
vm.assertNotEq(left, right, err); |
||
| 290 |
} |
||
| 291 | |||
| 292 |
function assertNotEq(bool[] memory left, bool[] memory right) internal pure virtual {
|
||
| 293 |
vm.assertNotEq(left, right); |
||
| 294 |
} |
||
| 295 | |||
| 296 |
function assertNotEq(bool[] memory left, bool[] memory right, string memory err) internal pure virtual {
|
||
| 297 |
vm.assertNotEq(left, right, err); |
||
| 298 |
} |
||
| 299 | |||
| 300 |
function assertNotEq(uint256[] memory left, uint256[] memory right) internal pure virtual {
|
||
| 301 |
vm.assertNotEq(left, right); |
||
| 302 |
} |
||
| 303 | |||
| 304 |
function assertNotEq(uint256[] memory left, uint256[] memory right, string memory err) internal pure virtual {
|
||
| 305 |
vm.assertNotEq(left, right, err); |
||
| 306 |
} |
||
| 307 | |||
| 308 |
function assertNotEq(int256[] memory left, int256[] memory right) internal pure virtual {
|
||
| 309 |
vm.assertNotEq(left, right); |
||
| 310 |
} |
||
| 311 | |||
| 312 |
function assertNotEq(int256[] memory left, int256[] memory right, string memory err) internal pure virtual {
|
||
| 313 |
vm.assertNotEq(left, right, err); |
||
| 314 |
} |
||
| 315 | |||
| 316 |
function assertNotEq(address[] memory left, address[] memory right) internal pure virtual {
|
||
| 317 |
vm.assertNotEq(left, right); |
||
| 318 |
} |
||
| 319 | |||
| 320 |
function assertNotEq(address[] memory left, address[] memory right, string memory err) internal pure virtual {
|
||
| 321 |
vm.assertNotEq(left, right, err); |
||
| 322 |
} |
||
| 323 | |||
| 324 |
function assertNotEq(bytes32[] memory left, bytes32[] memory right) internal pure virtual {
|
||
| 325 |
vm.assertNotEq(left, right); |
||
| 326 |
} |
||
| 327 | |||
| 328 |
function assertNotEq(bytes32[] memory left, bytes32[] memory right, string memory err) internal pure virtual {
|
||
| 329 |
vm.assertNotEq(left, right, err); |
||
| 330 |
} |
||
| 331 | |||
| 332 |
function assertNotEq(string[] memory left, string[] memory right) internal pure virtual {
|
||
| 333 |
vm.assertNotEq(left, right); |
||
| 334 |
} |
||
| 335 | |||
| 336 |
function assertNotEq(string[] memory left, string[] memory right, string memory err) internal pure virtual {
|
||
| 337 |
vm.assertNotEq(left, right, err); |
||
| 338 |
} |
||
| 339 | |||
| 340 |
function assertNotEq(bytes[] memory left, bytes[] memory right) internal pure virtual {
|
||
| 341 |
vm.assertNotEq(left, right); |
||
| 342 |
} |
||
| 343 | |||
| 344 |
function assertNotEq(bytes[] memory left, bytes[] memory right, string memory err) internal pure virtual {
|
||
| 345 |
vm.assertNotEq(left, right, err); |
||
| 346 |
} |
||
| 347 | |||
| 348 |
function assertLt(uint256 left, uint256 right) internal pure virtual {
|
||
| 349 |
vm.assertLt(left, right); |
||
| 350 |
} |
||
| 351 | |||
| 352 |
function assertLt(uint256 left, uint256 right, string memory err) internal pure virtual {
|
||
| 353 |
vm.assertLt(left, right, err); |
||
| 354 |
} |
||
| 355 | |||
| 356 |
function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
|
||
| 357 |
vm.assertLtDecimal(left, right, decimals); |
||
| 358 |
} |
||
| 359 | |||
| 360 |
function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 361 |
vm.assertLtDecimal(left, right, decimals, err); |
||
| 362 |
} |
||
| 363 | |||
| 364 |
function assertLt(int256 left, int256 right) internal pure virtual {
|
||
| 365 |
vm.assertLt(left, right); |
||
| 366 |
} |
||
| 367 | |||
| 368 |
function assertLt(int256 left, int256 right, string memory err) internal pure virtual {
|
||
| 369 |
vm.assertLt(left, right, err); |
||
| 370 |
} |
||
| 371 | |||
| 372 |
function assertLtDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
|
||
| 373 |
vm.assertLtDecimal(left, right, decimals); |
||
| 374 |
} |
||
| 375 | |||
| 376 |
function assertLtDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 377 |
vm.assertLtDecimal(left, right, decimals, err); |
||
| 378 |
} |
||
| 379 | |||
| 380 |
function assertGt(uint256 left, uint256 right) internal pure virtual {
|
||
| 381 |
vm.assertGt(left, right); |
||
| 382 |
} |
||
| 383 | |||
| 384 |
function assertGt(uint256 left, uint256 right, string memory err) internal pure virtual {
|
||
| 385 |
vm.assertGt(left, right, err); |
||
| 386 |
} |
||
| 387 | |||
| 388 |
function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
|
||
| 389 |
vm.assertGtDecimal(left, right, decimals); |
||
| 390 |
} |
||
| 391 | |||
| 392 |
function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 393 |
vm.assertGtDecimal(left, right, decimals, err); |
||
| 394 |
} |
||
| 395 | |||
| 396 |
function assertGt(int256 left, int256 right) internal pure virtual {
|
||
| 397 |
vm.assertGt(left, right); |
||
| 398 |
} |
||
| 399 | |||
| 400 |
function assertGt(int256 left, int256 right, string memory err) internal pure virtual {
|
||
| 401 |
vm.assertGt(left, right, err); |
||
| 402 |
} |
||
| 403 | |||
| 404 |
function assertGtDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
|
||
| 405 |
vm.assertGtDecimal(left, right, decimals); |
||
| 406 |
} |
||
| 407 | |||
| 408 |
function assertGtDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 409 |
vm.assertGtDecimal(left, right, decimals, err); |
||
| 410 |
} |
||
| 411 | |||
| 412 |
function assertLe(uint256 left, uint256 right) internal pure virtual {
|
||
| 413 |
vm.assertLe(left, right); |
||
| 414 |
} |
||
| 415 | |||
| 416 |
function assertLe(uint256 left, uint256 right, string memory err) internal pure virtual {
|
||
| 417 |
vm.assertLe(left, right, err); |
||
| 418 |
} |
||
| 419 | |||
| 420 |
function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
|
||
| 421 |
vm.assertLeDecimal(left, right, decimals); |
||
| 422 |
} |
||
| 423 | |||
| 424 |
function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 425 |
vm.assertLeDecimal(left, right, decimals, err); |
||
| 426 |
} |
||
| 427 | |||
| 428 |
function assertLe(int256 left, int256 right) internal pure virtual {
|
||
| 429 |
vm.assertLe(left, right); |
||
| 430 |
} |
||
| 431 | |||
| 432 |
function assertLe(int256 left, int256 right, string memory err) internal pure virtual {
|
||
| 433 |
vm.assertLe(left, right, err); |
||
| 434 |
} |
||
| 435 | |||
| 436 |
function assertLeDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
|
||
| 437 |
vm.assertLeDecimal(left, right, decimals); |
||
| 438 |
} |
||
| 439 | |||
| 440 |
function assertLeDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 441 |
vm.assertLeDecimal(left, right, decimals, err); |
||
| 442 |
} |
||
| 443 | |||
| 444 |
function assertGe(uint256 left, uint256 right) internal pure virtual {
|
||
| 445 |
vm.assertGe(left, right); |
||
| 446 |
} |
||
| 447 | |||
| 448 |
function assertGe(uint256 left, uint256 right, string memory err) internal pure virtual {
|
||
| 449 |
vm.assertGe(left, right, err); |
||
| 450 |
} |
||
| 451 | |||
| 452 |
function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
|
||
| 453 |
vm.assertGeDecimal(left, right, decimals); |
||
| 454 |
} |
||
| 455 | |||
| 456 |
function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 457 |
vm.assertGeDecimal(left, right, decimals, err); |
||
| 458 |
} |
||
| 459 | |||
| 460 |
function assertGe(int256 left, int256 right) internal pure virtual {
|
||
| 461 |
vm.assertGe(left, right); |
||
| 462 |
} |
||
| 463 | |||
| 464 |
function assertGe(int256 left, int256 right, string memory err) internal pure virtual {
|
||
| 465 |
vm.assertGe(left, right, err); |
||
| 466 |
} |
||
| 467 | |||
| 468 |
function assertGeDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
|
||
| 469 |
vm.assertGeDecimal(left, right, decimals); |
||
| 470 |
} |
||
| 471 | |||
| 472 |
function assertGeDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
|
||
| 473 |
vm.assertGeDecimal(left, right, decimals, err); |
||
| 474 |
} |
||
| 475 | |||
| 476 |
function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) internal pure virtual {
|
||
| 477 |
vm.assertApproxEqAbs(left, right, maxDelta); |
||
| 478 |
} |
||
| 479 | |||
| 480 |
function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string memory err) |
||
| 481 |
internal |
||
| 482 |
pure |
||
| 483 |
virtual |
||
| 484 |
{
|
||
| 485 |
vm.assertApproxEqAbs(left, right, maxDelta, err); |
||
| 486 |
} |
||
| 487 | |||
| 488 |
function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) |
||
| 489 |
internal |
||
| 490 |
pure |
||
| 491 |
virtual |
||
| 492 |
{
|
||
| 493 |
vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals); |
||
| 494 |
} |
||
| 495 | |||
| 496 |
function assertApproxEqAbsDecimal( |
||
| 497 |
uint256 left, |
||
| 498 |
uint256 right, |
||
| 499 |
uint256 maxDelta, |
||
| 500 |
uint256 decimals, |
||
| 501 |
string memory err |
||
| 502 |
) internal pure virtual {
|
||
| 503 |
vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals, err); |
||
| 504 |
} |
||
| 505 | |||
| 506 |
function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) internal pure virtual {
|
||
| 507 |
vm.assertApproxEqAbs(left, right, maxDelta); |
||
| 508 |
} |
||
| 509 | |||
| 510 |
function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string memory err) internal pure virtual {
|
||
| 511 |
vm.assertApproxEqAbs(left, right, maxDelta, err); |
||
| 512 |
} |
||
| 513 | |||
| 514 |
function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) |
||
| 515 |
internal |
||
| 516 |
pure |
||
| 517 |
virtual |
||
| 518 |
{
|
||
| 519 |
vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals); |
||
| 520 |
} |
||
| 521 | |||
| 522 |
function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals, string memory err) |
||
| 523 |
internal |
||
| 524 |
pure |
||
| 525 |
virtual |
||
| 526 |
{
|
||
| 527 |
vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals, err); |
||
| 528 |
} |
||
| 529 | |||
| 530 |
function assertApproxEqRel( |
||
| 531 |
uint256 left, |
||
| 532 |
uint256 right, |
||
| 533 |
uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100% |
||
| 534 |
) internal pure virtual {
|
||
| 535 |
vm.assertApproxEqRel(left, right, maxPercentDelta); |
||
| 536 |
} |
||
| 537 | |||
| 538 |
function assertApproxEqRel( |
||
| 539 |
uint256 left, |
||
| 540 |
uint256 right, |
||
| 541 |
uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
||
| 542 |
string memory err |
||
| 543 |
) internal pure virtual {
|
||
| 544 |
vm.assertApproxEqRel(left, right, maxPercentDelta, err); |
||
| 545 |
} |
||
| 546 | |||
| 547 |
function assertApproxEqRelDecimal( |
||
| 548 |
uint256 left, |
||
| 549 |
uint256 right, |
||
| 550 |
uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
||
| 551 |
uint256 decimals |
||
| 552 |
) internal pure virtual {
|
||
| 553 |
vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals); |
||
| 554 |
} |
||
| 555 | |||
| 556 |
function assertApproxEqRelDecimal( |
||
| 557 |
uint256 left, |
||
| 558 |
uint256 right, |
||
| 559 |
uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
||
| 560 |
uint256 decimals, |
||
| 561 |
string memory err |
||
| 562 |
) internal pure virtual {
|
||
| 563 |
vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals, err); |
||
| 564 |
} |
||
| 565 | |||
| 566 |
function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) internal pure virtual {
|
||
| 567 |
vm.assertApproxEqRel(left, right, maxPercentDelta); |
||
| 568 |
} |
||
| 569 | |||
| 570 |
function assertApproxEqRel( |
||
| 571 |
int256 left, |
||
| 572 |
int256 right, |
||
| 573 |
uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
||
| 574 |
string memory err |
||
| 575 |
) internal pure virtual {
|
||
| 576 |
vm.assertApproxEqRel(left, right, maxPercentDelta, err); |
||
| 577 |
} |
||
| 578 | |||
| 579 |
function assertApproxEqRelDecimal( |
||
| 580 |
int256 left, |
||
| 581 |
int256 right, |
||
| 582 |
uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
||
| 583 |
uint256 decimals |
||
| 584 |
) internal pure virtual {
|
||
| 585 |
vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals); |
||
| 586 |
} |
||
| 587 | |||
| 588 |
function assertApproxEqRelDecimal( |
||
| 589 |
int256 left, |
||
| 590 |
int256 right, |
||
| 591 |
uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
||
| 592 |
uint256 decimals, |
||
| 593 |
string memory err |
||
| 594 |
) internal pure virtual {
|
||
| 595 |
vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals, err); |
||
| 596 |
} |
||
| 597 | |||
| 598 |
// Inhertied from DSTest, not used but kept for backwards-compatibility |
||
| 599 |
function checkEq0(bytes memory left, bytes memory right) internal pure returns (bool) {
|
||
| 600 |
return keccak256(left) == keccak256(right); |
||
| 601 |
} |
||
| 602 | |||
| 603 |
function assertEq0(bytes memory left, bytes memory right) internal pure virtual {
|
||
| 604 |
assertEq(left, right); |
||
| 605 |
} |
||
| 606 | |||
| 607 |
function assertEq0(bytes memory left, bytes memory right, string memory err) internal pure virtual {
|
||
| 608 |
assertEq(left, right, err); |
||
| 609 |
} |
||
| 610 | |||
| 611 |
function assertNotEq0(bytes memory left, bytes memory right) internal pure virtual {
|
||
| 612 |
assertNotEq(left, right); |
||
| 613 |
} |
||
| 614 | |||
| 615 |
function assertNotEq0(bytes memory left, bytes memory right, string memory err) internal pure virtual {
|
||
| 616 |
assertNotEq(left, right, err); |
||
| 617 |
} |
||
| 618 | |||
| 619 |
function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {
|
||
| 620 |
assertEqCall(target, callDataA, target, callDataB, true); |
||
| 621 |
} |
||
| 622 | |||
| 623 |
function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB) |
||
| 624 |
internal |
||
| 625 |
virtual |
||
| 626 |
{
|
||
| 627 |
assertEqCall(targetA, callDataA, targetB, callDataB, true); |
||
| 628 |
} |
||
| 629 | |||
| 630 |
function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData) |
||
| 631 |
internal |
||
| 632 |
virtual |
||
| 633 |
{
|
||
| 634 |
assertEqCall(target, callDataA, target, callDataB, strictRevertData); |
||
| 635 |
} |
||
| 636 | |||
| 637 |
function assertEqCall( |
||
| 638 |
address targetA, |
||
| 639 |
bytes memory callDataA, |
||
| 640 |
address targetB, |
||
| 641 |
bytes memory callDataB, |
||
| 642 |
bool strictRevertData |
||
| 643 |
) internal virtual {
|
||
| 644 |
(bool successA, bytes memory returnDataA) = address(targetA).call(callDataA); |
||
| 645 |
(bool successB, bytes memory returnDataB) = address(targetB).call(callDataB); |
||
| 646 | |||
| 647 |
if (successA && successB) {
|
||
| 648 |
assertEq(returnDataA, returnDataB, "Call return data does not match"); |
||
| 649 |
} |
||
| 650 | |||
| 651 |
if (!successA && !successB && strictRevertData) {
|
||
| 652 |
assertEq(returnDataA, returnDataB, "Call revert data does not match"); |
||
| 653 |
} |
||
| 654 | |||
| 655 |
if (!successA && successB) {
|
||
| 656 |
emit log("Error: Calls were not equal");
|
||
| 657 |
emit log_named_bytes(" Left call revert data", returnDataA);
|
||
| 658 |
emit log_named_bytes(" Right call return data", returnDataB);
|
||
| 659 |
revert("assertion failed");
|
||
| 660 |
} |
||
| 661 | |||
| 662 |
if (successA && !successB) {
|
||
| 663 |
emit log("Error: Calls were not equal");
|
||
| 664 |
emit log_named_bytes(" Left call return data", returnDataA);
|
||
| 665 |
emit log_named_bytes(" Right call revert data", returnDataB);
|
||
| 666 |
revert("assertion failed");
|
||
| 667 |
} |
||
| 668 |
} |
||
| 669 |
} |
||
| 670 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
import {VmSafe} from "./Vm.sol";
|
||
| 5 | |||
| 6 |
/** |
||
| 7 |
* StdChains provides information about EVM compatible chains that can be used in scripts/tests. |
||
| 8 |
* For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are |
||
| 9 |
* identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of |
||
| 10 |
* the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the |
||
| 11 |
* alias used in this contract, which can be found as the first argument to the |
||
| 12 |
* `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function. |
||
| 13 |
* |
||
| 14 |
* There are two main ways to use this contract: |
||
| 15 |
* 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or |
||
| 16 |
* `setChain(string memory chainAlias, Chain memory chain)` |
||
| 17 |
* 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`. |
||
| 18 |
* |
||
| 19 |
* The first time either of those are used, chains are initialized with the default set of RPC URLs. |
||
| 20 |
* This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in |
||
| 21 |
* `defaultRpcUrls`. |
||
| 22 |
* |
||
| 23 |
* The `setChain` function is straightforward, and it simply saves off the given chain data. |
||
| 24 |
* |
||
| 25 |
* The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say |
||
| 26 |
* we want to retrieve the RPC URL for `mainnet`: |
||
| 27 |
* - If you have specified data with `setChain`, it will return that. |
||
| 28 |
* - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it |
||
| 29 |
* is valid (e.g. a URL is specified, or an environment variable is given and exists). |
||
| 30 |
* - If neither of the above conditions is met, the default data is returned. |
||
| 31 |
* |
||
| 32 |
* Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults. |
||
| 33 |
*/ |
||
| 34 |
abstract contract StdChains {
|
||
| 35 |
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
|
||
| 36 | |||
| 37 |
bool private stdChainsInitialized; |
||
| 38 | |||
| 39 |
struct ChainData {
|
||
| 40 |
string name; |
||
| 41 |
uint256 chainId; |
||
| 42 |
string rpcUrl; |
||
| 43 |
} |
||
| 44 | |||
| 45 |
struct Chain {
|
||
| 46 |
// The chain name. |
||
| 47 |
string name; |
||
| 48 |
// The chain's Chain ID. |
||
| 49 |
uint256 chainId; |
||
| 50 |
// The chain's alias. (i.e. what gets specified in `foundry.toml`). |
||
| 51 |
string chainAlias; |
||
| 52 |
// A default RPC endpoint for this chain. |
||
| 53 |
// NOTE: This default RPC URL is included for convenience to facilitate quick tests and |
||
| 54 |
// experimentation. Do not use this RPC URL for production test suites, CI, or other heavy |
||
| 55 |
// usage as you will be throttled and this is a disservice to others who need this endpoint. |
||
| 56 |
string rpcUrl; |
||
| 57 |
} |
||
| 58 | |||
| 59 |
// Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data. |
||
| 60 |
mapping(string => Chain) private chains; |
||
| 61 |
// Maps from the chain's alias to it's default RPC URL. |
||
| 62 |
mapping(string => string) private defaultRpcUrls; |
||
| 63 |
// Maps from a chain ID to it's alias. |
||
| 64 |
mapping(uint256 => string) private idToAlias; |
||
| 65 | |||
| 66 |
bool private fallbackToDefaultRpcUrls = true; |
||
| 67 | |||
| 68 |
// The RPC URL will be fetched from config or defaultRpcUrls if possible. |
||
| 69 |
function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {
|
||
| 70 |
require(bytes(chainAlias).length != 0, "StdChains getChain(string): Chain alias cannot be the empty string."); |
||
| 71 | |||
| 72 |
initializeStdChains(); |
||
| 73 |
chain = chains[chainAlias]; |
||
| 74 |
require( |
||
| 75 |
chain.chainId != 0, |
||
| 76 |
string(abi.encodePacked("StdChains getChain(string): Chain with alias \"", chainAlias, "\" not found."))
|
||
| 77 |
); |
||
| 78 | |||
| 79 |
chain = getChainWithUpdatedRpcUrl(chainAlias, chain); |
||
| 80 |
} |
||
| 81 | |||
| 82 |
function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {
|
||
| 83 |
require(chainId != 0, "StdChains getChain(uint256): Chain ID cannot be 0."); |
||
| 84 |
initializeStdChains(); |
||
| 85 |
string memory chainAlias = idToAlias[chainId]; |
||
| 86 | |||
| 87 |
chain = chains[chainAlias]; |
||
| 88 | |||
| 89 |
require( |
||
| 90 |
chain.chainId != 0, |
||
| 91 |
string(abi.encodePacked("StdChains getChain(uint256): Chain with ID ", vm.toString(chainId), " not found."))
|
||
| 92 |
); |
||
| 93 | |||
| 94 |
chain = getChainWithUpdatedRpcUrl(chainAlias, chain); |
||
| 95 |
} |
||
| 96 | |||
| 97 |
// set chain info, with priority to argument's rpcUrl field. |
||
| 98 |
function setChain(string memory chainAlias, ChainData memory chain) internal virtual {
|
||
| 99 |
require( |
||
| 100 |
bytes(chainAlias).length != 0, |
||
| 101 |
"StdChains setChain(string,ChainData): Chain alias cannot be the empty string." |
||
| 102 |
); |
||
| 103 | |||
| 104 |
require(chain.chainId != 0, "StdChains setChain(string,ChainData): Chain ID cannot be 0."); |
||
| 105 | |||
| 106 |
initializeStdChains(); |
||
| 107 |
string memory foundAlias = idToAlias[chain.chainId]; |
||
| 108 | |||
| 109 |
require( |
||
| 110 |
bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)), |
||
| 111 |
string( |
||
| 112 |
abi.encodePacked( |
||
| 113 |
"StdChains setChain(string,ChainData): Chain ID ", |
||
| 114 |
vm.toString(chain.chainId), |
||
| 115 |
" already used by \"", |
||
| 116 |
foundAlias, |
||
| 117 |
"\"." |
||
| 118 |
) |
||
| 119 |
) |
||
| 120 |
); |
||
| 121 | |||
| 122 |
uint256 oldChainId = chains[chainAlias].chainId; |
||
| 123 |
delete idToAlias[oldChainId]; |
||
| 124 | |||
| 125 |
chains[chainAlias] = |
||
| 126 |
Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});
|
||
| 127 |
idToAlias[chain.chainId] = chainAlias; |
||
| 128 |
} |
||
| 129 | |||
| 130 |
// set chain info, with priority to argument's rpcUrl field. |
||
| 131 |
function setChain(string memory chainAlias, Chain memory chain) internal virtual {
|
||
| 132 |
setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));
|
||
| 133 |
} |
||
| 134 | |||
| 135 |
function _toUpper(string memory str) private pure returns (string memory) {
|
||
| 136 |
bytes memory strb = bytes(str); |
||
| 137 |
bytes memory copy = new bytes(strb.length); |
||
| 138 |
for (uint256 i = 0; i < strb.length; i++) {
|
||
| 139 |
bytes1 b = strb[i]; |
||
| 140 |
if (b >= 0x61 && b <= 0x7A) {
|
||
| 141 |
copy[i] = bytes1(uint8(b) - 32); |
||
| 142 |
} else {
|
||
| 143 |
copy[i] = b; |
||
| 144 |
} |
||
| 145 |
} |
||
| 146 |
return string(copy); |
||
| 147 |
} |
||
| 148 | |||
| 149 |
// lookup rpcUrl, in descending order of priority: |
||
| 150 |
// current -> config (foundry.toml) -> environment variable -> default |
||
| 151 |
function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) |
||
| 152 |
private |
||
| 153 |
view |
||
| 154 |
returns (Chain memory) |
||
| 155 |
{
|
||
| 156 |
if (bytes(chain.rpcUrl).length == 0) {
|
||
| 157 |
try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {
|
||
| 158 |
chain.rpcUrl = configRpcUrl; |
||
| 159 |
} catch (bytes memory err) {
|
||
| 160 |
string memory envName = string(abi.encodePacked(_toUpper(chainAlias), "_RPC_URL")); |
||
| 161 |
if (fallbackToDefaultRpcUrls) {
|
||
| 162 |
chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]); |
||
| 163 |
} else {
|
||
| 164 |
chain.rpcUrl = vm.envString(envName); |
||
| 165 |
} |
||
| 166 |
// Distinguish 'not found' from 'cannot read' |
||
| 167 |
// The upstream error thrown by forge for failing cheats changed so we check both the old and new versions |
||
| 168 |
bytes memory oldNotFoundError = |
||
| 169 |
abi.encodeWithSignature("CheatCodeError", string(abi.encodePacked("invalid rpc url ", chainAlias)));
|
||
| 170 |
bytes memory newNotFoundError = abi.encodeWithSignature( |
||
| 171 |
"CheatcodeError(string)", string(abi.encodePacked("invalid rpc url: ", chainAlias))
|
||
| 172 |
); |
||
| 173 |
bytes32 errHash = keccak256(err); |
||
| 174 |
if ( |
||
| 175 |
(errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError)) |
||
| 176 |
|| bytes(chain.rpcUrl).length == 0 |
||
| 177 |
) {
|
||
| 178 |
/// @solidity memory-safe-assembly |
||
| 179 |
assembly {
|
||
| 180 |
revert(add(32, err), mload(err)) |
||
| 181 |
} |
||
| 182 |
} |
||
| 183 |
} |
||
| 184 |
} |
||
| 185 |
return chain; |
||
| 186 |
} |
||
| 187 | |||
| 188 |
function setFallbackToDefaultRpcUrls(bool useDefault) internal {
|
||
| 189 |
fallbackToDefaultRpcUrls = useDefault; |
||
| 190 |
} |
||
| 191 | |||
| 192 |
function initializeStdChains() private {
|
||
| 193 |
if (stdChainsInitialized) return; |
||
| 194 | |||
| 195 |
stdChainsInitialized = true; |
||
| 196 | |||
| 197 |
// If adding an RPC here, make sure to test the default RPC URL in `testRpcs` |
||
| 198 |
setChainWithDefaultRpcUrl("anvil", ChainData("Anvil", 31337, "http://127.0.0.1:8545"));
|
||
| 199 |
setChainWithDefaultRpcUrl( |
||
| 200 |
"mainnet", ChainData("Mainnet", 1, "https://eth-mainnet.alchemyapi.io/v2/pwc5rmJhrdoaSEfimoKEmsvOjKSmPDrP")
|
||
| 201 |
); |
||
| 202 |
setChainWithDefaultRpcUrl( |
||
| 203 |
"goerli", ChainData("Goerli", 5, "https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001")
|
||
| 204 |
); |
||
| 205 |
setChainWithDefaultRpcUrl( |
||
| 206 |
"sepolia", ChainData("Sepolia", 11155111, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001")
|
||
| 207 |
); |
||
| 208 |
setChainWithDefaultRpcUrl("optimism", ChainData("Optimism", 10, "https://mainnet.optimism.io"));
|
||
| 209 |
setChainWithDefaultRpcUrl("optimism_goerli", ChainData("Optimism Goerli", 420, "https://goerli.optimism.io"));
|
||
| 210 |
setChainWithDefaultRpcUrl("arbitrum_one", ChainData("Arbitrum One", 42161, "https://arb1.arbitrum.io/rpc"));
|
||
| 211 |
setChainWithDefaultRpcUrl( |
||
| 212 |
"arbitrum_one_goerli", ChainData("Arbitrum One Goerli", 421613, "https://goerli-rollup.arbitrum.io/rpc")
|
||
| 213 |
); |
||
| 214 |
setChainWithDefaultRpcUrl("arbitrum_nova", ChainData("Arbitrum Nova", 42170, "https://nova.arbitrum.io/rpc"));
|
||
| 215 |
setChainWithDefaultRpcUrl("polygon", ChainData("Polygon", 137, "https://polygon-rpc.com"));
|
||
| 216 |
setChainWithDefaultRpcUrl( |
||
| 217 |
"polygon_mumbai", ChainData("Polygon Mumbai", 80001, "https://rpc-mumbai.maticvigil.com")
|
||
| 218 |
); |
||
| 219 |
setChainWithDefaultRpcUrl("avalanche", ChainData("Avalanche", 43114, "https://api.avax.network/ext/bc/C/rpc"));
|
||
| 220 |
setChainWithDefaultRpcUrl( |
||
| 221 |
"avalanche_fuji", ChainData("Avalanche Fuji", 43113, "https://api.avax-test.network/ext/bc/C/rpc")
|
||
| 222 |
); |
||
| 223 |
setChainWithDefaultRpcUrl( |
||
| 224 |
"bnb_smart_chain", ChainData("BNB Smart Chain", 56, "https://bsc-dataseed1.binance.org")
|
||
| 225 |
); |
||
| 226 |
setChainWithDefaultRpcUrl( |
||
| 227 |
"bnb_smart_chain_testnet", |
||
| 228 |
ChainData("BNB Smart Chain Testnet", 97, "https://rpc.ankr.com/bsc_testnet_chapel")
|
||
| 229 |
); |
||
| 230 |
setChainWithDefaultRpcUrl("gnosis_chain", ChainData("Gnosis Chain", 100, "https://rpc.gnosischain.com"));
|
||
| 231 |
setChainWithDefaultRpcUrl("moonbeam", ChainData("Moonbeam", 1284, "https://rpc.api.moonbeam.network"));
|
||
| 232 |
setChainWithDefaultRpcUrl( |
||
| 233 |
"moonriver", ChainData("Moonriver", 1285, "https://rpc.api.moonriver.moonbeam.network")
|
||
| 234 |
); |
||
| 235 |
setChainWithDefaultRpcUrl("moonbase", ChainData("Moonbase", 1287, "https://rpc.testnet.moonbeam.network"));
|
||
| 236 |
setChainWithDefaultRpcUrl("base_goerli", ChainData("Base Goerli", 84531, "https://goerli.base.org"));
|
||
| 237 |
setChainWithDefaultRpcUrl("base", ChainData("Base", 8453, "https://mainnet.base.org"));
|
||
| 238 |
setChainWithDefaultRpcUrl("fraxtal", ChainData("Fraxtal", 252, "https://rpc.frax.com"));
|
||
| 239 |
setChainWithDefaultRpcUrl("fraxtal_testnet", ChainData("Fraxtal Testnet", 2522, "https://rpc.testnet.frax.com"));
|
||
| 240 |
} |
||
| 241 | |||
| 242 |
// set chain info, with priority to chainAlias' rpc url in foundry.toml |
||
| 243 |
function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {
|
||
| 244 |
string memory rpcUrl = chain.rpcUrl; |
||
| 245 |
defaultRpcUrls[chainAlias] = rpcUrl; |
||
| 246 |
chain.rpcUrl = ""; |
||
| 247 |
setChain(chainAlias, chain); |
||
| 248 |
chain.rpcUrl = rpcUrl; // restore argument |
||
| 249 |
} |
||
| 250 |
} |
||
| 251 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
pragma experimental ABIEncoderV2; |
||
| 5 | |||
| 6 |
import {StdStorage, stdStorage} from "./StdStorage.sol";
|
||
| 7 |
import {console2} from "./console2.sol";
|
||
| 8 |
import {Vm} from "./Vm.sol";
|
||
| 9 | |||
| 10 |
abstract contract StdCheatsSafe {
|
||
| 11 |
Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code")))));
|
||
| 12 | |||
| 13 |
uint256 private constant UINT256_MAX = |
||
| 14 |
115792089237316195423570985008687907853269984665640564039457584007913129639935; |
||
| 15 | |||
| 16 |
bool private gasMeteringOff; |
||
| 17 | |||
| 18 |
// Data structures to parse Transaction objects from the broadcast artifact |
||
| 19 |
// that conform to EIP1559. The Raw structs is what is parsed from the JSON |
||
| 20 |
// and then converted to the one that is used by the user for better UX. |
||
| 21 | |||
| 22 |
struct RawTx1559 {
|
||
| 23 |
string[] arguments; |
||
| 24 |
address contractAddress; |
||
| 25 |
string contractName; |
||
| 26 |
// json value name = function |
||
| 27 |
string functionSig; |
||
| 28 |
bytes32 hash; |
||
| 29 |
// json value name = tx |
||
| 30 |
RawTx1559Detail txDetail; |
||
| 31 |
// json value name = type |
||
| 32 |
string opcode; |
||
| 33 |
} |
||
| 34 | |||
| 35 |
struct RawTx1559Detail {
|
||
| 36 |
AccessList[] accessList; |
||
| 37 |
bytes data; |
||
| 38 |
address from; |
||
| 39 |
bytes gas; |
||
| 40 |
bytes nonce; |
||
| 41 |
address to; |
||
| 42 |
bytes txType; |
||
| 43 |
bytes value; |
||
| 44 |
} |
||
| 45 | |||
| 46 |
struct Tx1559 {
|
||
| 47 |
string[] arguments; |
||
| 48 |
address contractAddress; |
||
| 49 |
string contractName; |
||
| 50 |
string functionSig; |
||
| 51 |
bytes32 hash; |
||
| 52 |
Tx1559Detail txDetail; |
||
| 53 |
string opcode; |
||
| 54 |
} |
||
| 55 | |||
| 56 |
struct Tx1559Detail {
|
||
| 57 |
AccessList[] accessList; |
||
| 58 |
bytes data; |
||
| 59 |
address from; |
||
| 60 |
uint256 gas; |
||
| 61 |
uint256 nonce; |
||
| 62 |
address to; |
||
| 63 |
uint256 txType; |
||
| 64 |
uint256 value; |
||
| 65 |
} |
||
| 66 | |||
| 67 |
// Data structures to parse Transaction objects from the broadcast artifact |
||
| 68 |
// that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON |
||
| 69 |
// and then converted to the one that is used by the user for better UX. |
||
| 70 | |||
| 71 |
struct TxLegacy {
|
||
| 72 |
string[] arguments; |
||
| 73 |
address contractAddress; |
||
| 74 |
string contractName; |
||
| 75 |
string functionSig; |
||
| 76 |
string hash; |
||
| 77 |
string opcode; |
||
| 78 |
TxDetailLegacy transaction; |
||
| 79 |
} |
||
| 80 | |||
| 81 |
struct TxDetailLegacy {
|
||
| 82 |
AccessList[] accessList; |
||
| 83 |
uint256 chainId; |
||
| 84 |
bytes data; |
||
| 85 |
address from; |
||
| 86 |
uint256 gas; |
||
| 87 |
uint256 gasPrice; |
||
| 88 |
bytes32 hash; |
||
| 89 |
uint256 nonce; |
||
| 90 |
bytes1 opcode; |
||
| 91 |
bytes32 r; |
||
| 92 |
bytes32 s; |
||
| 93 |
uint256 txType; |
||
| 94 |
address to; |
||
| 95 |
uint8 v; |
||
| 96 |
uint256 value; |
||
| 97 |
} |
||
| 98 | |||
| 99 |
struct AccessList {
|
||
| 100 |
address accessAddress; |
||
| 101 |
bytes32[] storageKeys; |
||
| 102 |
} |
||
| 103 | |||
| 104 |
// Data structures to parse Receipt objects from the broadcast artifact. |
||
| 105 |
// The Raw structs is what is parsed from the JSON |
||
| 106 |
// and then converted to the one that is used by the user for better UX. |
||
| 107 | |||
| 108 |
struct RawReceipt {
|
||
| 109 |
bytes32 blockHash; |
||
| 110 |
bytes blockNumber; |
||
| 111 |
address contractAddress; |
||
| 112 |
bytes cumulativeGasUsed; |
||
| 113 |
bytes effectiveGasPrice; |
||
| 114 |
address from; |
||
| 115 |
bytes gasUsed; |
||
| 116 |
RawReceiptLog[] logs; |
||
| 117 |
bytes logsBloom; |
||
| 118 |
bytes status; |
||
| 119 |
address to; |
||
| 120 |
bytes32 transactionHash; |
||
| 121 |
bytes transactionIndex; |
||
| 122 |
} |
||
| 123 | |||
| 124 |
struct Receipt {
|
||
| 125 |
bytes32 blockHash; |
||
| 126 |
uint256 blockNumber; |
||
| 127 |
address contractAddress; |
||
| 128 |
uint256 cumulativeGasUsed; |
||
| 129 |
uint256 effectiveGasPrice; |
||
| 130 |
address from; |
||
| 131 |
uint256 gasUsed; |
||
| 132 |
ReceiptLog[] logs; |
||
| 133 |
bytes logsBloom; |
||
| 134 |
uint256 status; |
||
| 135 |
address to; |
||
| 136 |
bytes32 transactionHash; |
||
| 137 |
uint256 transactionIndex; |
||
| 138 |
} |
||
| 139 | |||
| 140 |
// Data structures to parse the entire broadcast artifact, assuming the |
||
| 141 |
// transactions conform to EIP1559. |
||
| 142 | |||
| 143 |
struct EIP1559ScriptArtifact {
|
||
| 144 |
string[] libraries; |
||
| 145 |
string path; |
||
| 146 |
string[] pending; |
||
| 147 |
Receipt[] receipts; |
||
| 148 |
uint256 timestamp; |
||
| 149 |
Tx1559[] transactions; |
||
| 150 |
TxReturn[] txReturns; |
||
| 151 |
} |
||
| 152 | |||
| 153 |
struct RawEIP1559ScriptArtifact {
|
||
| 154 |
string[] libraries; |
||
| 155 |
string path; |
||
| 156 |
string[] pending; |
||
| 157 |
RawReceipt[] receipts; |
||
| 158 |
TxReturn[] txReturns; |
||
| 159 |
uint256 timestamp; |
||
| 160 |
RawTx1559[] transactions; |
||
| 161 |
} |
||
| 162 | |||
| 163 |
struct RawReceiptLog {
|
||
| 164 |
// json value = address |
||
| 165 |
address logAddress; |
||
| 166 |
bytes32 blockHash; |
||
| 167 |
bytes blockNumber; |
||
| 168 |
bytes data; |
||
| 169 |
bytes logIndex; |
||
| 170 |
bool removed; |
||
| 171 |
bytes32[] topics; |
||
| 172 |
bytes32 transactionHash; |
||
| 173 |
bytes transactionIndex; |
||
| 174 |
bytes transactionLogIndex; |
||
| 175 |
} |
||
| 176 | |||
| 177 |
struct ReceiptLog {
|
||
| 178 |
// json value = address |
||
| 179 |
address logAddress; |
||
| 180 |
bytes32 blockHash; |
||
| 181 |
uint256 blockNumber; |
||
| 182 |
bytes data; |
||
| 183 |
uint256 logIndex; |
||
| 184 |
bytes32[] topics; |
||
| 185 |
uint256 transactionIndex; |
||
| 186 |
uint256 transactionLogIndex; |
||
| 187 |
bool removed; |
||
| 188 |
} |
||
| 189 | |||
| 190 |
struct TxReturn {
|
||
| 191 |
string internalType; |
||
| 192 |
string value; |
||
| 193 |
} |
||
| 194 | |||
| 195 |
struct Account {
|
||
| 196 |
address addr; |
||
| 197 |
uint256 key; |
||
| 198 |
} |
||
| 199 | |||
| 200 |
enum AddressType {
|
||
| 201 |
Payable, |
||
| 202 |
NonPayable, |
||
| 203 |
ZeroAddress, |
||
| 204 |
Precompile, |
||
| 205 |
ForgeAddress |
||
| 206 |
} |
||
| 207 | |||
| 208 |
// Checks that `addr` is not blacklisted by token contracts that have a blacklist. |
||
| 209 |
function assumeNotBlacklisted(address token, address addr) internal view virtual {
|
||
| 210 |
// Nothing to check if `token` is not a contract. |
||
| 211 |
uint256 tokenCodeSize; |
||
| 212 |
assembly {
|
||
| 213 |
tokenCodeSize := extcodesize(token) |
||
| 214 |
} |
||
| 215 |
require(tokenCodeSize > 0, "StdCheats assumeNotBlacklisted(address,address): Token address is not a contract."); |
||
| 216 | |||
| 217 |
bool success; |
||
| 218 |
bytes memory returnData; |
||
| 219 | |||
| 220 |
// 4-byte selector for `isBlacklisted(address)`, used by USDC. |
||
| 221 |
(success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr)); |
||
| 222 |
vm.assume(!success || abi.decode(returnData, (bool)) == false); |
||
| 223 | |||
| 224 |
// 4-byte selector for `isBlackListed(address)`, used by USDT. |
||
| 225 |
(success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr)); |
||
| 226 |
vm.assume(!success || abi.decode(returnData, (bool)) == false); |
||
| 227 |
} |
||
| 228 | |||
| 229 |
// Checks that `addr` is not blacklisted by token contracts that have a blacklist. |
||
| 230 |
// This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for |
||
| 231 |
// backwards compatibility, since this name was used in the original PR which has already has |
||
| 232 |
// a release. This function can be removed in a future release once we want a breaking change. |
||
| 233 |
function assumeNoBlacklisted(address token, address addr) internal view virtual {
|
||
| 234 |
assumeNotBlacklisted(token, addr); |
||
| 235 |
} |
||
| 236 | |||
| 237 |
function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {
|
||
| 238 |
if (addressType == AddressType.Payable) {
|
||
| 239 |
assumeNotPayable(addr); |
||
| 240 |
} else if (addressType == AddressType.NonPayable) {
|
||
| 241 |
assumePayable(addr); |
||
| 242 |
} else if (addressType == AddressType.ZeroAddress) {
|
||
| 243 |
assumeNotZeroAddress(addr); |
||
| 244 |
} else if (addressType == AddressType.Precompile) {
|
||
| 245 |
assumeNotPrecompile(addr); |
||
| 246 |
} else if (addressType == AddressType.ForgeAddress) {
|
||
| 247 |
assumeNotForgeAddress(addr); |
||
| 248 |
} |
||
| 249 |
} |
||
| 250 | |||
| 251 |
function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {
|
||
| 252 |
assumeAddressIsNot(addr, addressType1); |
||
| 253 |
assumeAddressIsNot(addr, addressType2); |
||
| 254 |
} |
||
| 255 | |||
| 256 |
function assumeAddressIsNot( |
||
| 257 |
address addr, |
||
| 258 |
AddressType addressType1, |
||
| 259 |
AddressType addressType2, |
||
| 260 |
AddressType addressType3 |
||
| 261 |
) internal virtual {
|
||
| 262 |
assumeAddressIsNot(addr, addressType1); |
||
| 263 |
assumeAddressIsNot(addr, addressType2); |
||
| 264 |
assumeAddressIsNot(addr, addressType3); |
||
| 265 |
} |
||
| 266 | |||
| 267 |
function assumeAddressIsNot( |
||
| 268 |
address addr, |
||
| 269 |
AddressType addressType1, |
||
| 270 |
AddressType addressType2, |
||
| 271 |
AddressType addressType3, |
||
| 272 |
AddressType addressType4 |
||
| 273 |
) internal virtual {
|
||
| 274 |
assumeAddressIsNot(addr, addressType1); |
||
| 275 |
assumeAddressIsNot(addr, addressType2); |
||
| 276 |
assumeAddressIsNot(addr, addressType3); |
||
| 277 |
assumeAddressIsNot(addr, addressType4); |
||
| 278 |
} |
||
| 279 | |||
| 280 |
// This function checks whether an address, `addr`, is payable. It works by sending 1 wei to |
||
| 281 |
// `addr` and checking the `success` return value. |
||
| 282 |
// NOTE: This function may result in state changes depending on the fallback/receive logic |
||
| 283 |
// implemented by `addr`, which should be taken into account when this function is used. |
||
| 284 |
function _isPayable(address addr) private returns (bool) {
|
||
| 285 |
require( |
||
| 286 |
addr.balance < UINT256_MAX, |
||
| 287 |
"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds" |
||
| 288 |
); |
||
| 289 |
uint256 origBalanceTest = address(this).balance; |
||
| 290 |
uint256 origBalanceAddr = address(addr).balance; |
||
| 291 | |||
| 292 |
vm.deal(address(this), 1); |
||
| 293 |
(bool success,) = payable(addr).call{value: 1}("");
|
||
| 294 | |||
| 295 |
// reset balances |
||
| 296 |
vm.deal(address(this), origBalanceTest); |
||
| 297 |
vm.deal(addr, origBalanceAddr); |
||
| 298 | |||
| 299 |
return success; |
||
| 300 |
} |
||
| 301 | |||
| 302 |
// NOTE: This function may result in state changes depending on the fallback/receive logic |
||
| 303 |
// implemented by `addr`, which should be taken into account when this function is used. See the |
||
| 304 |
// `_isPayable` method for more information. |
||
| 305 |
function assumePayable(address addr) internal virtual {
|
||
| 306 |
vm.assume(_isPayable(addr)); |
||
| 307 |
} |
||
| 308 | |||
| 309 |
function assumeNotPayable(address addr) internal virtual {
|
||
| 310 |
vm.assume(!_isPayable(addr)); |
||
| 311 |
} |
||
| 312 | |||
| 313 |
function assumeNotZeroAddress(address addr) internal pure virtual {
|
||
| 314 |
vm.assume(addr != address(0)); |
||
| 315 |
} |
||
| 316 | |||
| 317 |
function assumeNotPrecompile(address addr) internal pure virtual {
|
||
| 318 |
assumeNotPrecompile(addr, _pureChainId()); |
||
| 319 |
} |
||
| 320 | |||
| 321 |
function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {
|
||
| 322 |
// Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific |
||
| 323 |
// address), but the same rationale for excluding them applies so we include those too. |
||
| 324 | |||
| 325 |
// These should be present on all EVM-compatible chains. |
||
| 326 |
vm.assume(addr < address(0x1) || addr > address(0x9)); |
||
| 327 | |||
| 328 |
// forgefmt: disable-start |
||
| 329 |
if (chainId == 10 || chainId == 420) {
|
||
| 330 |
// https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21 |
||
| 331 |
vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800)); |
||
| 332 |
} else if (chainId == 42161 || chainId == 421613) {
|
||
| 333 |
// https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains |
||
| 334 |
vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068)); |
||
| 335 |
} else if (chainId == 43114 || chainId == 43113) {
|
||
| 336 |
// https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59 |
||
| 337 |
vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff)); |
||
| 338 |
vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF)); |
||
| 339 |
vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff)); |
||
| 340 |
} |
||
| 341 |
// forgefmt: disable-end |
||
| 342 |
} |
||
| 343 | |||
| 344 |
function assumeNotForgeAddress(address addr) internal pure virtual {
|
||
| 345 |
// vm, console, and Create2Deployer addresses |
||
| 346 |
vm.assume( |
||
| 347 |
addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67 |
||
| 348 |
&& addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C |
||
| 349 |
); |
||
| 350 |
} |
||
| 351 | |||
| 352 |
function readEIP1559ScriptArtifact(string memory path) |
||
| 353 |
internal |
||
| 354 |
view |
||
| 355 |
virtual |
||
| 356 |
returns (EIP1559ScriptArtifact memory) |
||
| 357 |
{
|
||
| 358 |
string memory data = vm.readFile(path); |
||
| 359 |
bytes memory parsedData = vm.parseJson(data); |
||
| 360 |
RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact)); |
||
| 361 |
EIP1559ScriptArtifact memory artifact; |
||
| 362 |
artifact.libraries = rawArtifact.libraries; |
||
| 363 |
artifact.path = rawArtifact.path; |
||
| 364 |
artifact.timestamp = rawArtifact.timestamp; |
||
| 365 |
artifact.pending = rawArtifact.pending; |
||
| 366 |
artifact.txReturns = rawArtifact.txReturns; |
||
| 367 |
artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts); |
||
| 368 |
artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions); |
||
| 369 |
return artifact; |
||
| 370 |
} |
||
| 371 | |||
| 372 |
function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {
|
||
| 373 |
Tx1559[] memory txs = new Tx1559[](rawTxs.length); |
||
| 374 |
for (uint256 i; i < rawTxs.length; i++) {
|
||
| 375 |
txs[i] = rawToConvertedEIPTx1559(rawTxs[i]); |
||
| 376 |
} |
||
| 377 |
return txs; |
||
| 378 |
} |
||
| 379 | |||
| 380 |
function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {
|
||
| 381 |
Tx1559 memory transaction; |
||
| 382 |
transaction.arguments = rawTx.arguments; |
||
| 383 |
transaction.contractName = rawTx.contractName; |
||
| 384 |
transaction.functionSig = rawTx.functionSig; |
||
| 385 |
transaction.hash = rawTx.hash; |
||
| 386 |
transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail); |
||
| 387 |
transaction.opcode = rawTx.opcode; |
||
| 388 |
return transaction; |
||
| 389 |
} |
||
| 390 | |||
| 391 |
function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail) |
||
| 392 |
internal |
||
| 393 |
pure |
||
| 394 |
virtual |
||
| 395 |
returns (Tx1559Detail memory) |
||
| 396 |
{
|
||
| 397 |
Tx1559Detail memory txDetail; |
||
| 398 |
txDetail.data = rawDetail.data; |
||
| 399 |
txDetail.from = rawDetail.from; |
||
| 400 |
txDetail.to = rawDetail.to; |
||
| 401 |
txDetail.nonce = _bytesToUint(rawDetail.nonce); |
||
| 402 |
txDetail.txType = _bytesToUint(rawDetail.txType); |
||
| 403 |
txDetail.value = _bytesToUint(rawDetail.value); |
||
| 404 |
txDetail.gas = _bytesToUint(rawDetail.gas); |
||
| 405 |
txDetail.accessList = rawDetail.accessList; |
||
| 406 |
return txDetail; |
||
| 407 |
} |
||
| 408 | |||
| 409 |
function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {
|
||
| 410 |
string memory deployData = vm.readFile(path); |
||
| 411 |
bytes memory parsedDeployData = vm.parseJson(deployData, ".transactions"); |
||
| 412 |
RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[])); |
||
| 413 |
return rawToConvertedEIPTx1559s(rawTxs); |
||
| 414 |
} |
||
| 415 | |||
| 416 |
function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {
|
||
| 417 |
string memory deployData = vm.readFile(path); |
||
| 418 |
string memory key = string(abi.encodePacked(".transactions[", vm.toString(index), "]"));
|
||
| 419 |
bytes memory parsedDeployData = vm.parseJson(deployData, key); |
||
| 420 |
RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559)); |
||
| 421 |
return rawToConvertedEIPTx1559(rawTx); |
||
| 422 |
} |
||
| 423 | |||
| 424 |
// Analogous to readTransactions, but for receipts. |
||
| 425 |
function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {
|
||
| 426 |
string memory deployData = vm.readFile(path); |
||
| 427 |
bytes memory parsedDeployData = vm.parseJson(deployData, ".receipts"); |
||
| 428 |
RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[])); |
||
| 429 |
return rawToConvertedReceipts(rawReceipts); |
||
| 430 |
} |
||
| 431 | |||
| 432 |
function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {
|
||
| 433 |
string memory deployData = vm.readFile(path); |
||
| 434 |
string memory key = string(abi.encodePacked(".receipts[", vm.toString(index), "]"));
|
||
| 435 |
bytes memory parsedDeployData = vm.parseJson(deployData, key); |
||
| 436 |
RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt)); |
||
| 437 |
return rawToConvertedReceipt(rawReceipt); |
||
| 438 |
} |
||
| 439 | |||
| 440 |
function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {
|
||
| 441 |
Receipt[] memory receipts = new Receipt[](rawReceipts.length); |
||
| 442 |
for (uint256 i; i < rawReceipts.length; i++) {
|
||
| 443 |
receipts[i] = rawToConvertedReceipt(rawReceipts[i]); |
||
| 444 |
} |
||
| 445 |
return receipts; |
||
| 446 |
} |
||
| 447 | |||
| 448 |
function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {
|
||
| 449 |
Receipt memory receipt; |
||
| 450 |
receipt.blockHash = rawReceipt.blockHash; |
||
| 451 |
receipt.to = rawReceipt.to; |
||
| 452 |
receipt.from = rawReceipt.from; |
||
| 453 |
receipt.contractAddress = rawReceipt.contractAddress; |
||
| 454 |
receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice); |
||
| 455 |
receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed); |
||
| 456 |
receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed); |
||
| 457 |
receipt.status = _bytesToUint(rawReceipt.status); |
||
| 458 |
receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex); |
||
| 459 |
receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber); |
||
| 460 |
receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs); |
||
| 461 |
receipt.logsBloom = rawReceipt.logsBloom; |
||
| 462 |
receipt.transactionHash = rawReceipt.transactionHash; |
||
| 463 |
return receipt; |
||
| 464 |
} |
||
| 465 | |||
| 466 |
function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs) |
||
| 467 |
internal |
||
| 468 |
pure |
||
| 469 |
virtual |
||
| 470 |
returns (ReceiptLog[] memory) |
||
| 471 |
{
|
||
| 472 |
ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length); |
||
| 473 |
for (uint256 i; i < rawLogs.length; i++) {
|
||
| 474 |
logs[i].logAddress = rawLogs[i].logAddress; |
||
| 475 |
logs[i].blockHash = rawLogs[i].blockHash; |
||
| 476 |
logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber); |
||
| 477 |
logs[i].data = rawLogs[i].data; |
||
| 478 |
logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex); |
||
| 479 |
logs[i].topics = rawLogs[i].topics; |
||
| 480 |
logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex); |
||
| 481 |
logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex); |
||
| 482 |
logs[i].removed = rawLogs[i].removed; |
||
| 483 |
} |
||
| 484 |
return logs; |
||
| 485 |
} |
||
| 486 | |||
| 487 |
// Deploy a contract by fetching the contract bytecode from |
||
| 488 |
// the artifacts directory |
||
| 489 |
// e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))` |
||
| 490 |
function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {
|
||
| 491 |
bytes memory bytecode = abi.encodePacked(vm.getCode(what), args); |
||
| 492 |
/// @solidity memory-safe-assembly |
||
| 493 |
assembly {
|
||
| 494 |
addr := create(0, add(bytecode, 0x20), mload(bytecode)) |
||
| 495 |
} |
||
| 496 | |||
| 497 |
require(addr != address(0), "StdCheats deployCode(string,bytes): Deployment failed."); |
||
| 498 |
} |
||
| 499 | |||
| 500 |
function deployCode(string memory what) internal virtual returns (address addr) {
|
||
| 501 |
bytes memory bytecode = vm.getCode(what); |
||
| 502 |
/// @solidity memory-safe-assembly |
||
| 503 |
assembly {
|
||
| 504 |
addr := create(0, add(bytecode, 0x20), mload(bytecode)) |
||
| 505 |
} |
||
| 506 | |||
| 507 |
require(addr != address(0), "StdCheats deployCode(string): Deployment failed."); |
||
| 508 |
} |
||
| 509 | |||
| 510 |
/// @dev deploy contract with value on construction |
||
| 511 |
function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {
|
||
| 512 |
bytes memory bytecode = abi.encodePacked(vm.getCode(what), args); |
||
| 513 |
/// @solidity memory-safe-assembly |
||
| 514 |
assembly {
|
||
| 515 |
addr := create(val, add(bytecode, 0x20), mload(bytecode)) |
||
| 516 |
} |
||
| 517 | |||
| 518 |
require(addr != address(0), "StdCheats deployCode(string,bytes,uint256): Deployment failed."); |
||
| 519 |
} |
||
| 520 | |||
| 521 |
function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {
|
||
| 522 |
bytes memory bytecode = vm.getCode(what); |
||
| 523 |
/// @solidity memory-safe-assembly |
||
| 524 |
assembly {
|
||
| 525 |
addr := create(val, add(bytecode, 0x20), mload(bytecode)) |
||
| 526 |
} |
||
| 527 | |||
| 528 |
require(addr != address(0), "StdCheats deployCode(string,uint256): Deployment failed."); |
||
| 529 |
} |
||
| 530 | |||
| 531 |
// creates a labeled address and the corresponding private key |
||
| 532 |
function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {
|
||
| 533 |
privateKey = uint256(keccak256(abi.encodePacked(name))); |
||
| 534 |
addr = vm.addr(privateKey); |
||
| 535 |
vm.label(addr, name); |
||
| 536 |
} |
||
| 537 | |||
| 538 |
// creates a labeled address |
||
| 539 |
function makeAddr(string memory name) internal virtual returns (address addr) {
|
||
| 540 |
(addr,) = makeAddrAndKey(name); |
||
| 541 |
} |
||
| 542 | |||
| 543 |
// Destroys an account immediately, sending the balance to beneficiary. |
||
| 544 |
// Destroying means: balance will be zero, code will be empty, and nonce will be 0 |
||
| 545 |
// This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce |
||
| 546 |
// only after tx ends, this will run immediately. |
||
| 547 |
function destroyAccount(address who, address beneficiary) internal virtual {
|
||
| 548 |
uint256 currBalance = who.balance; |
||
| 549 |
vm.etch(who, abi.encode()); |
||
| 550 |
vm.deal(who, 0); |
||
| 551 |
vm.resetNonce(who); |
||
| 552 | |||
| 553 |
uint256 beneficiaryBalance = beneficiary.balance; |
||
| 554 |
vm.deal(beneficiary, currBalance + beneficiaryBalance); |
||
| 555 |
} |
||
| 556 | |||
| 557 |
// creates a struct containing both a labeled address and the corresponding private key |
||
| 558 |
function makeAccount(string memory name) internal virtual returns (Account memory account) {
|
||
| 559 |
(account.addr, account.key) = makeAddrAndKey(name); |
||
| 560 |
} |
||
| 561 | |||
| 562 |
function deriveRememberKey(string memory mnemonic, uint32 index) |
||
| 563 |
internal |
||
| 564 |
virtual |
||
| 565 |
returns (address who, uint256 privateKey) |
||
| 566 |
{
|
||
| 567 |
privateKey = vm.deriveKey(mnemonic, index); |
||
| 568 |
who = vm.rememberKey(privateKey); |
||
| 569 |
} |
||
| 570 | |||
| 571 |
function _bytesToUint(bytes memory b) private pure returns (uint256) {
|
||
| 572 |
require(b.length <= 32, "StdCheats _bytesToUint(bytes): Bytes length exceeds 32."); |
||
| 573 |
return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256)); |
||
| 574 |
} |
||
| 575 | |||
| 576 |
function isFork() internal view virtual returns (bool status) {
|
||
| 577 |
try vm.activeFork() {
|
||
| 578 |
status = true; |
||
| 579 |
} catch (bytes memory) {}
|
||
| 580 |
} |
||
| 581 | |||
| 582 |
modifier skipWhenForking() {
|
||
| 583 |
if (!isFork()) {
|
||
| 584 |
_; |
||
| 585 |
} |
||
| 586 |
} |
||
| 587 | |||
| 588 |
modifier skipWhenNotForking() {
|
||
| 589 |
if (isFork()) {
|
||
| 590 |
_; |
||
| 591 |
} |
||
| 592 |
} |
||
| 593 | |||
| 594 |
modifier noGasMetering() {
|
||
| 595 |
vm.pauseGasMetering(); |
||
| 596 |
// To prevent turning gas monitoring back on with nested functions that use this modifier, |
||
| 597 |
// we check if gasMetering started in the off position. If it did, we don't want to turn |
||
| 598 |
// it back on until we exit the top level function that used the modifier |
||
| 599 |
// |
||
| 600 |
// i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.
|
||
| 601 |
// funcA will have `gasStartedOff` as false, funcB will have it as true, |
||
| 602 |
// so we only turn metering back on at the end of the funcA |
||
| 603 |
bool gasStartedOff = gasMeteringOff; |
||
| 604 |
gasMeteringOff = true; |
||
| 605 | |||
| 606 |
_; |
||
| 607 | |||
| 608 |
// if gas metering was on when this modifier was called, turn it back on at the end |
||
| 609 |
if (!gasStartedOff) {
|
||
| 610 |
gasMeteringOff = false; |
||
| 611 |
vm.resumeGasMetering(); |
||
| 612 |
} |
||
| 613 |
} |
||
| 614 | |||
| 615 |
// We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no |
||
| 616 |
// compiler warnings when accessing chain ID in any solidity version supported by forge-std. We |
||
| 617 |
// can't simply access the chain ID in a normal view or pure function because the solc View Pure |
||
| 618 |
// Checker changed `chainid` from pure to view in 0.8.0. |
||
| 619 |
function _viewChainId() private view returns (uint256 chainId) {
|
||
| 620 |
// Assembly required since `block.chainid` was introduced in 0.8.0. |
||
| 621 |
assembly {
|
||
| 622 |
chainId := chainid() |
||
| 623 |
} |
||
| 624 | |||
| 625 |
address(this); // Silence warnings in older Solc versions. |
||
| 626 |
} |
||
| 627 | |||
| 628 |
function _pureChainId() private pure returns (uint256 chainId) {
|
||
| 629 |
function() internal view returns (uint256) fnIn = _viewChainId; |
||
| 630 |
function() internal pure returns (uint256) pureChainId; |
||
| 631 |
assembly {
|
||
| 632 |
pureChainId := fnIn |
||
| 633 |
} |
||
| 634 |
chainId = pureChainId(); |
||
| 635 |
} |
||
| 636 |
} |
||
| 637 | |||
| 638 |
// Wrappers around cheatcodes to avoid footguns |
||
| 639 |
abstract contract StdCheats is StdCheatsSafe {
|
||
| 640 |
using stdStorage for StdStorage; |
||
| 641 | |||
| 642 |
StdStorage private stdstore; |
||
| 643 |
Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code")))));
|
||
| 644 |
address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; |
||
| 645 | |||
| 646 |
// Skip forward or rewind time by the specified number of seconds |
||
| 647 |
function skip(uint256 time) internal virtual {
|
||
| 648 |
vm.warp(block.timestamp + time); |
||
| 649 |
} |
||
| 650 | |||
| 651 |
function rewind(uint256 time) internal virtual {
|
||
| 652 |
vm.warp(block.timestamp - time); |
||
| 653 |
} |
||
| 654 | |||
| 655 |
// Setup a prank from an address that has some ether |
||
| 656 |
function hoax(address msgSender) internal virtual {
|
||
| 657 |
vm.deal(msgSender, 1 << 128); |
||
| 658 |
vm.prank(msgSender); |
||
| 659 |
} |
||
| 660 | |||
| 661 |
function hoax(address msgSender, uint256 give) internal virtual {
|
||
| 662 |
vm.deal(msgSender, give); |
||
| 663 |
vm.prank(msgSender); |
||
| 664 |
} |
||
| 665 | |||
| 666 |
function hoax(address msgSender, address origin) internal virtual {
|
||
| 667 |
vm.deal(msgSender, 1 << 128); |
||
| 668 |
vm.prank(msgSender, origin); |
||
| 669 |
} |
||
| 670 | |||
| 671 |
function hoax(address msgSender, address origin, uint256 give) internal virtual {
|
||
| 672 |
vm.deal(msgSender, give); |
||
| 673 |
vm.prank(msgSender, origin); |
||
| 674 |
} |
||
| 675 | |||
| 676 |
// Start perpetual prank from an address that has some ether |
||
| 677 |
function startHoax(address msgSender) internal virtual {
|
||
| 678 |
vm.deal(msgSender, 1 << 128); |
||
| 679 |
vm.startPrank(msgSender); |
||
| 680 |
} |
||
| 681 | |||
| 682 |
function startHoax(address msgSender, uint256 give) internal virtual {
|
||
| 683 |
vm.deal(msgSender, give); |
||
| 684 |
vm.startPrank(msgSender); |
||
| 685 |
} |
||
| 686 | |||
| 687 |
// Start perpetual prank from an address that has some ether |
||
| 688 |
// tx.origin is set to the origin parameter |
||
| 689 |
function startHoax(address msgSender, address origin) internal virtual {
|
||
| 690 |
vm.deal(msgSender, 1 << 128); |
||
| 691 |
vm.startPrank(msgSender, origin); |
||
| 692 |
} |
||
| 693 | |||
| 694 |
function startHoax(address msgSender, address origin, uint256 give) internal virtual {
|
||
| 695 |
vm.deal(msgSender, give); |
||
| 696 |
vm.startPrank(msgSender, origin); |
||
| 697 |
} |
||
| 698 | |||
| 699 |
function changePrank(address msgSender) internal virtual {
|
||
| 700 |
console2_log_StdCheats("changePrank is deprecated. Please use vm.startPrank instead.");
|
||
| 701 |
vm.stopPrank(); |
||
| 702 |
vm.startPrank(msgSender); |
||
| 703 |
} |
||
| 704 | |||
| 705 |
function changePrank(address msgSender, address txOrigin) internal virtual {
|
||
| 706 |
vm.stopPrank(); |
||
| 707 |
vm.startPrank(msgSender, txOrigin); |
||
| 708 |
} |
||
| 709 | |||
| 710 |
// The same as Vm's `deal` |
||
| 711 |
// Use the alternative signature for ERC20 tokens |
||
| 712 |
function deal(address to, uint256 give) internal virtual {
|
||
| 713 |
vm.deal(to, give); |
||
| 714 |
} |
||
| 715 | |||
| 716 |
// Set the balance of an account for any ERC20 token |
||
| 717 |
// Use the alternative signature to update `totalSupply` |
||
| 718 |
function deal(address token, address to, uint256 give) internal virtual {
|
||
| 719 |
deal(token, to, give, false); |
||
| 720 |
} |
||
| 721 | |||
| 722 |
// Set the balance of an account for any ERC1155 token |
||
| 723 |
// Use the alternative signature to update `totalSupply` |
||
| 724 |
function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {
|
||
| 725 |
dealERC1155(token, to, id, give, false); |
||
| 726 |
} |
||
| 727 | |||
| 728 |
function deal(address token, address to, uint256 give, bool adjust) internal virtual {
|
||
| 729 |
// get current balance |
||
| 730 |
(, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); |
||
| 731 |
uint256 prevBal = abi.decode(balData, (uint256)); |
||
| 732 | |||
| 733 |
// update balance |
||
| 734 |
stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give); |
||
| 735 | |||
| 736 |
// update total supply |
||
| 737 |
if (adjust) {
|
||
| 738 |
(, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd)); |
||
| 739 |
uint256 totSup = abi.decode(totSupData, (uint256)); |
||
| 740 |
if (give < prevBal) {
|
||
| 741 |
totSup -= (prevBal - give); |
||
| 742 |
} else {
|
||
| 743 |
totSup += (give - prevBal); |
||
| 744 |
} |
||
| 745 |
stdstore.target(token).sig(0x18160ddd).checked_write(totSup); |
||
| 746 |
} |
||
| 747 |
} |
||
| 748 | |||
| 749 |
function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {
|
||
| 750 |
// get current balance |
||
| 751 |
(, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id)); |
||
| 752 |
uint256 prevBal = abi.decode(balData, (uint256)); |
||
| 753 | |||
| 754 |
// update balance |
||
| 755 |
stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give); |
||
| 756 | |||
| 757 |
// update total supply |
||
| 758 |
if (adjust) {
|
||
| 759 |
(, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id)); |
||
| 760 |
require( |
||
| 761 |
totSupData.length != 0, |
||
| 762 |
"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply." |
||
| 763 |
); |
||
| 764 |
uint256 totSup = abi.decode(totSupData, (uint256)); |
||
| 765 |
if (give < prevBal) {
|
||
| 766 |
totSup -= (prevBal - give); |
||
| 767 |
} else {
|
||
| 768 |
totSup += (give - prevBal); |
||
| 769 |
} |
||
| 770 |
stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup); |
||
| 771 |
} |
||
| 772 |
} |
||
| 773 | |||
| 774 |
function dealERC721(address token, address to, uint256 id) internal virtual {
|
||
| 775 |
// check if token id is already minted and the actual owner. |
||
| 776 |
(bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id)); |
||
| 777 |
require(successMinted, "StdCheats deal(address,address,uint,bool): id not minted."); |
||
| 778 | |||
| 779 |
// get owner current balance |
||
| 780 |
(, bytes memory fromBalData) = |
||
| 781 |
token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address)))); |
||
| 782 |
uint256 fromPrevBal = abi.decode(fromBalData, (uint256)); |
||
| 783 | |||
| 784 |
// get new user current balance |
||
| 785 |
(, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); |
||
| 786 |
uint256 toPrevBal = abi.decode(toBalData, (uint256)); |
||
| 787 | |||
| 788 |
// update balances |
||
| 789 |
stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal); |
||
| 790 |
stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal); |
||
| 791 | |||
| 792 |
// update owner |
||
| 793 |
stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to); |
||
| 794 |
} |
||
| 795 | |||
| 796 |
function deployCodeTo(string memory what, address where) internal virtual {
|
||
| 797 |
deployCodeTo(what, "", 0, where); |
||
| 798 |
} |
||
| 799 | |||
| 800 |
function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {
|
||
| 801 |
deployCodeTo(what, args, 0, where); |
||
| 802 |
} |
||
| 803 | |||
| 804 |
function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {
|
||
| 805 |
bytes memory creationCode = vm.getCode(what); |
||
| 806 |
vm.etch(where, abi.encodePacked(creationCode, args)); |
||
| 807 |
(bool success, bytes memory runtimeBytecode) = where.call{value: value}("");
|
||
| 808 |
require(success, "StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode."); |
||
| 809 |
vm.etch(where, runtimeBytecode); |
||
| 810 |
} |
||
| 811 | |||
| 812 |
// Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere. |
||
| 813 |
function console2_log_StdCheats(string memory p0) private view {
|
||
| 814 |
(bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature("log(string)", p0));
|
||
| 815 |
status; |
||
| 816 |
} |
||
| 817 |
} |
||
| 818 |
| Lines covered: | 0 / 10 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test |
||
| 3 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 4 | |||
| 5 |
library stdError {
|
||
| 6 |
bytes public constant assertionError = abi.encodeWithSignature("Panic(uint256)", 0x01);
|
||
| 7 |
bytes public constant arithmeticError = abi.encodeWithSignature("Panic(uint256)", 0x11);
|
||
| 8 |
bytes public constant divisionError = abi.encodeWithSignature("Panic(uint256)", 0x12);
|
||
| 9 |
bytes public constant enumConversionError = abi.encodeWithSignature("Panic(uint256)", 0x21);
|
||
| 10 |
bytes public constant encodeStorageError = abi.encodeWithSignature("Panic(uint256)", 0x22);
|
||
| 11 |
bytes public constant popError = abi.encodeWithSignature("Panic(uint256)", 0x31);
|
||
| 12 |
bytes public constant indexOOBError = abi.encodeWithSignature("Panic(uint256)", 0x32);
|
||
| 13 |
bytes public constant memOverflowError = abi.encodeWithSignature("Panic(uint256)", 0x41);
|
||
| 14 |
bytes public constant zeroVarError = abi.encodeWithSignature("Panic(uint256)", 0x51);
|
||
| 15 |
} |
||
| 16 |
| Lines covered: | 0 / 18 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
pragma experimental ABIEncoderV2; |
||
| 5 | |||
| 6 |
abstract contract StdInvariant {
|
||
| 7 |
struct FuzzSelector {
|
||
| 8 |
address addr; |
||
| 9 |
bytes4[] selectors; |
||
| 10 |
} |
||
| 11 | |||
| 12 |
struct FuzzInterface {
|
||
| 13 |
address addr; |
||
| 14 |
string[] artifacts; |
||
| 15 |
} |
||
| 16 | |||
| 17 |
address[] private _excludedContracts; |
||
| 18 |
address[] private _excludedSenders; |
||
| 19 |
address[] private _targetedContracts; |
||
| 20 |
address[] private _targetedSenders; |
||
| 21 | |||
| 22 |
string[] private _excludedArtifacts; |
||
| 23 |
string[] private _targetedArtifacts; |
||
| 24 | |||
| 25 |
FuzzSelector[] private _targetedArtifactSelectors; |
||
| 26 |
FuzzSelector[] private _targetedSelectors; |
||
| 27 | |||
| 28 |
FuzzInterface[] private _targetedInterfaces; |
||
| 29 | |||
| 30 |
// Functions for users: |
||
| 31 |
// These are intended to be called in tests. |
||
| 32 | |||
| 33 |
function excludeContract(address newExcludedContract_) internal {
|
||
| 34 |
_excludedContracts.push(newExcludedContract_); |
||
| 35 |
} |
||
| 36 | |||
| 37 |
function excludeSender(address newExcludedSender_) internal {
|
||
| 38 |
_excludedSenders.push(newExcludedSender_); |
||
| 39 |
} |
||
| 40 | |||
| 41 |
function excludeArtifact(string memory newExcludedArtifact_) internal {
|
||
| 42 |
_excludedArtifacts.push(newExcludedArtifact_); |
||
| 43 |
} |
||
| 44 | |||
| 45 |
function targetArtifact(string memory newTargetedArtifact_) internal {
|
||
| 46 |
_targetedArtifacts.push(newTargetedArtifact_); |
||
| 47 |
} |
||
| 48 | |||
| 49 |
function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {
|
||
| 50 |
_targetedArtifactSelectors.push(newTargetedArtifactSelector_); |
||
| 51 |
} |
||
| 52 | |||
| 53 |
function targetContract(address newTargetedContract_) internal {
|
||
| 54 |
_targetedContracts.push(newTargetedContract_); |
||
| 55 |
} |
||
| 56 | |||
| 57 |
function targetSelector(FuzzSelector memory newTargetedSelector_) internal {
|
||
| 58 |
_targetedSelectors.push(newTargetedSelector_); |
||
| 59 |
} |
||
| 60 | |||
| 61 |
function targetSender(address newTargetedSender_) internal {
|
||
| 62 |
_targetedSenders.push(newTargetedSender_); |
||
| 63 |
} |
||
| 64 | |||
| 65 |
function targetInterface(FuzzInterface memory newTargetedInterface_) internal {
|
||
| 66 |
_targetedInterfaces.push(newTargetedInterface_); |
||
| 67 |
} |
||
| 68 | |||
| 69 |
// Functions for forge: |
||
| 70 |
// These are called by forge to run invariant tests and don't need to be called in tests. |
||
| 71 | |||
| 72 |
function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {
|
||
| 73 |
excludedArtifacts_ = _excludedArtifacts; |
||
| 74 |
} |
||
| 75 | |||
| 76 |
function excludeContracts() public view returns (address[] memory excludedContracts_) {
|
||
| 77 |
excludedContracts_ = _excludedContracts; |
||
| 78 |
} |
||
| 79 | |||
| 80 |
function excludeSenders() public view returns (address[] memory excludedSenders_) {
|
||
| 81 |
excludedSenders_ = _excludedSenders; |
||
| 82 |
} |
||
| 83 | |||
| 84 |
function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {
|
||
| 85 |
targetedArtifacts_ = _targetedArtifacts; |
||
| 86 |
} |
||
| 87 | |||
| 88 |
function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {
|
||
| 89 |
targetedArtifactSelectors_ = _targetedArtifactSelectors; |
||
| 90 |
} |
||
| 91 | |||
| 92 |
function targetContracts() public view returns (address[] memory targetedContracts_) {
|
||
| 93 |
targetedContracts_ = _targetedContracts; |
||
| 94 |
} |
||
| 95 | |||
| 96 |
function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {
|
||
| 97 |
targetedSelectors_ = _targetedSelectors; |
||
| 98 |
} |
||
| 99 | |||
| 100 |
function targetSenders() public view returns (address[] memory targetedSenders_) {
|
||
| 101 |
targetedSenders_ = _targetedSenders; |
||
| 102 |
} |
||
| 103 | |||
| 104 |
function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {
|
||
| 105 |
targetedInterfaces_ = _targetedInterfaces; |
||
| 106 |
} |
||
| 107 |
} |
||
| 108 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.0 <0.9.0; |
||
| 3 | |||
| 4 |
pragma experimental ABIEncoderV2; |
||
| 5 | |||
| 6 |
import {VmSafe} from "./Vm.sol";
|
||
| 7 | |||
| 8 |
// Helpers for parsing and writing JSON files |
||
| 9 |
// To parse: |
||
| 10 |
// ``` |
||
| 11 |
// using stdJson for string; |
||
| 12 |
// string memory json = vm.readFile("<some_path>");
|
||
| 13 |
// json.readUint("<json_path>");
|
||
| 14 |
// ``` |
||
| 15 |
// To write: |
||
| 16 |
// ``` |
||
| 17 |
// using stdJson for string; |
||
| 18 |
// string memory json = "json"; |
||
| 19 |
// json.serialize("a", uint256(123));
|
||
| 20 |
// string memory semiFinal = json.serialize("b", string("test"));
|
||
| 21 |
// string memory finalJson = json.serialize("c", semiFinal);
|
||
| 22 |
// finalJson.write("<some_path>");
|
||
| 23 |
// ``` |
||
| 24 | |||
| 25 |
library stdJson {
|
||
| 26 |
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
|
||
| 27 | |||
| 28 |
function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {
|
||
| 29 |
return vm.parseJson(json, key); |
||
| 30 |
} |
||
| 31 | |||
| 32 |
function readUint(string memory json, string memory key) internal pure returns (uint256) {
|
||
| 33 |
return vm.parseJsonUint(json, key); |
||
| 34 |
} |
||
| 35 | |||
| 36 |
function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {
|
||
| 37 |
return vm.parseJsonUintArray(json, key); |
||
| 38 |
} |
||
| 39 | |||
| 40 |
function readInt(string memory json, string memory key) internal pure returns (int256) {
|
||
| 41 |
return vm.parseJsonInt(json, key); |
||
| 42 |
} |
||
| 43 | |||
| 44 |
function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {
|
||
| 45 |
return vm.parseJsonIntArray(json, key); |
||
| 46 |
} |
||
| 47 | |||
| 48 |
function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {
|
||
| 49 |
return vm.parseJsonBytes32(json, key); |
||
| 50 |
} |
||
| 51 | |||
| 52 |
function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {
|
||
| 53 |
return vm.parseJsonBytes32Array(json, key); |
||
| 54 |
} |
||
| 55 | |||
| 56 |
function readString(string memory json, string memory key) internal pure returns (string memory) {
|
||
| 57 |
return vm.parseJsonString(json, key); |
||
| 58 |
} |
||
| 59 | |||
| 60 |
function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {
|
||
| 61 |
return vm.parseJsonStringArray(json, key); |
||
| 62 |
} |
||
| 63 | |||
| 64 |
function readAddress(string memory json, string memory key) internal pure returns (address) {
|
||
| 65 |
return vm.parseJsonAddress(json, key); |
||
| 66 |
} |
||
| 67 | |||
| 68 |
function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {
|
||
| 69 |
return vm.parseJsonAddressArray(json, key); |
||
| 70 |
} |
||
| 71 | |||
| 72 |
function readBool(string memory json, string memory key) internal pure returns (bool) {
|
||
| 73 |
return vm.parseJsonBool(json, key); |
||
| 74 |
} |
||
| 75 | |||
| 76 |
function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {
|
||
| 77 |
return vm.parseJsonBoolArray(json, key); |
||
| 78 |
} |
||
| 79 | |||
| 80 |
function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {
|
||
| 81 |
return vm.parseJsonBytes(json, key); |
||
| 82 |
} |
||
| 83 | |||
| 84 |
function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {
|
||
| 85 |
return vm.parseJsonBytesArray(json, key); |
||
| 86 |
} |
||
| 87 | |||
| 88 |
function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {
|
||
| 89 |
return vm.serializeJson(jsonKey, rootObject); |
||
| 90 |
} |
||
| 91 | |||
| 92 |
function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {
|
||
| 93 |
return vm.serializeBool(jsonKey, key, value); |
||
| 94 |
} |
||
| 95 | |||
| 96 |
function serialize(string memory jsonKey, string memory key, bool[] memory value) |
||
| 97 |
internal |
||
| 98 |
returns (string memory) |
||
| 99 |
{
|
||
| 100 |
return vm.serializeBool(jsonKey, key, value); |
||
| 101 |
} |
||
| 102 | |||
| 103 |
function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {
|
||
| 104 |
return vm.serializeUint(jsonKey, key, value); |
||
| 105 |
} |
||
| 106 | |||
| 107 |
function serialize(string memory jsonKey, string memory key, uint256[] memory value) |
||
| 108 |
internal |
||
| 109 |
returns (string memory) |
||
| 110 |
{
|
||
| 111 |
return vm.serializeUint(jsonKey, key, value); |
||
| 112 |
} |
||
| 113 | |||
| 114 |
function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {
|
||
| 115 |
return vm.serializeInt(jsonKey, key, value); |
||
| 116 |
} |
||
| 117 | |||
| 118 |
function serialize(string memory jsonKey, string memory key, int256[] memory value) |
||
| 119 |
internal |
||
| 120 |
returns (string memory) |
||
| 121 |
{
|
||
| 122 |
return vm.serializeInt(jsonKey, key, value); |
||
| 123 |
} |
||
| 124 | |||
| 125 |
function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {
|
||
| 126 |
return vm.serializeAddress(jsonKey, key, value); |
||
| 127 |
} |
||
| 128 | |||
| 129 |
function serialize(string memory jsonKey, string memory key, address[] memory value) |
||
| 130 |
internal |
||
| 131 |
returns (string memory) |
||
| 132 |
{
|
||
| 133 |
return vm.serializeAddress(jsonKey, key, value); |
||
| 134 |
} |
||
| 135 | |||
| 136 |
function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {
|
||
| 137 |
return vm.serializeBytes32(jsonKey, key, value); |
||
| 138 |
} |
||
| 139 | |||
| 140 |
function serialize(string memory jsonKey, string memory key, bytes32[] memory value) |
||
| 141 |
internal |
||
| 142 |
returns (string memory) |
||
| 143 |
{
|
||
| 144 |
return vm.serializeBytes32(jsonKey, key, value); |
||
| 145 |
} |
||
| 146 | |||
| 147 |
function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {
|
||
| 148 |
return vm.serializeBytes(jsonKey, key, value); |
||
| 149 |
} |
||
| 150 | |||
| 151 |
function serialize(string memory jsonKey, string memory key, bytes[] memory value) |
||
| 152 |
internal |
||
| 153 |
returns (string memory) |
||
| 154 |
{
|
||
| 155 |
return vm.serializeBytes(jsonKey, key, value); |
||
| 156 |
} |
||
| 157 | |||
| 158 |
function serialize(string memory jsonKey, string memory key, string memory value) |
||
| 159 |
internal |
||
| 160 |
returns (string memory) |
||
| 161 |
{
|
||
| 162 |
return vm.serializeString(jsonKey, key, value); |
||
| 163 |
} |
||
| 164 | |||
| 165 |
function serialize(string memory jsonKey, string memory key, string[] memory value) |
||
| 166 |
internal |
||
| 167 |
returns (string memory) |
||
| 168 |
{
|
||
| 169 |
return vm.serializeString(jsonKey, key, value); |
||
| 170 |
} |
||
| 171 | |||
| 172 |
function write(string memory jsonKey, string memory path) internal {
|
||
| 173 |
vm.writeJson(jsonKey, path); |
||
| 174 |
} |
||
| 175 | |||
| 176 |
function write(string memory jsonKey, string memory path, string memory valueKey) internal {
|
||
| 177 |
vm.writeJson(jsonKey, path, valueKey); |
||
| 178 |
} |
||
| 179 |
} |
||
| 180 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
library stdMath {
|
||
| 5 |
int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968; |
||
| 6 | |||
| 7 |
function abs(int256 a) internal pure returns (uint256) {
|
||
| 8 |
// Required or it will fail when `a = type(int256).min` |
||
| 9 |
if (a == INT256_MIN) {
|
||
| 10 |
return 57896044618658097711785492504343953926634992332820282019728792003956564819968; |
||
| 11 |
} |
||
| 12 | |||
| 13 |
return uint256(a > 0 ? a : -a); |
||
| 14 |
} |
||
| 15 | |||
| 16 |
function delta(uint256 a, uint256 b) internal pure returns (uint256) {
|
||
| 17 |
return a > b ? a - b : b - a; |
||
| 18 |
} |
||
| 19 | |||
| 20 |
function delta(int256 a, int256 b) internal pure returns (uint256) {
|
||
| 21 |
// a and b are of the same sign |
||
| 22 |
// this works thanks to two's complement, the left-most bit is the sign bit |
||
| 23 |
if ((a ^ b) > -1) {
|
||
| 24 |
return delta(abs(a), abs(b)); |
||
| 25 |
} |
||
| 26 | |||
| 27 |
// a and b are of opposite signs |
||
| 28 |
return abs(a) + abs(b); |
||
| 29 |
} |
||
| 30 | |||
| 31 |
function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {
|
||
| 32 |
uint256 absDelta = delta(a, b); |
||
| 33 | |||
| 34 |
return absDelta * 1e18 / b; |
||
| 35 |
} |
||
| 36 | |||
| 37 |
function percentDelta(int256 a, int256 b) internal pure returns (uint256) {
|
||
| 38 |
uint256 absDelta = delta(a, b); |
||
| 39 |
uint256 absB = abs(b); |
||
| 40 | |||
| 41 |
return absDelta * 1e18 / absB; |
||
| 42 |
} |
||
| 43 |
} |
||
| 44 |
| Lines covered: | 0 / 2 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
import {Vm} from "./Vm.sol";
|
||
| 5 | |||
| 6 |
struct FindData {
|
||
| 7 |
uint256 slot; |
||
| 8 |
uint256 offsetLeft; |
||
| 9 |
uint256 offsetRight; |
||
| 10 |
bool found; |
||
| 11 |
} |
||
| 12 | |||
| 13 |
struct StdStorage {
|
||
| 14 |
mapping(address => mapping(bytes4 => mapping(bytes32 => FindData))) finds; |
||
| 15 |
bytes32[] _keys; |
||
| 16 |
bytes4 _sig; |
||
| 17 |
uint256 _depth; |
||
| 18 |
address _target; |
||
| 19 |
bytes32 _set; |
||
| 20 |
bool _enable_packed_slots; |
||
| 21 |
bytes _calldata; |
||
| 22 |
} |
||
| 23 | |||
| 24 |
library stdStorageSafe {
|
||
| 25 |
event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot); |
||
| 26 |
event WARNING_UninitedSlot(address who, uint256 slot); |
||
| 27 | |||
| 28 |
Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code")))));
|
||
| 29 |
uint256 constant UINT256_MAX = 115792089237316195423570985008687907853269984665640564039457584007913129639935; |
||
| 30 | |||
| 31 |
function sigs(string memory sigStr) internal pure returns (bytes4) {
|
||
| 32 |
return bytes4(keccak256(bytes(sigStr))); |
||
| 33 |
} |
||
| 34 | |||
| 35 |
function getCallParams(StdStorage storage self) internal view returns (bytes memory) {
|
||
| 36 |
if (self._calldata.length == 0) {
|
||
| 37 |
return flatten(self._keys); |
||
| 38 |
} else {
|
||
| 39 |
return self._calldata; |
||
| 40 |
} |
||
| 41 |
} |
||
| 42 | |||
| 43 |
// Calls target contract with configured parameters |
||
| 44 |
function callTarget(StdStorage storage self) internal view returns (bool, bytes32) {
|
||
| 45 |
bytes memory cald = abi.encodePacked(self._sig, getCallParams(self)); |
||
| 46 |
(bool success, bytes memory rdat) = self._target.staticcall(cald); |
||
| 47 |
bytes32 result = bytesToBytes32(rdat, 32 * self._depth); |
||
| 48 | |||
| 49 |
return (success, result); |
||
| 50 |
} |
||
| 51 | |||
| 52 |
// Tries mutating slot value to determine if the targeted value is stored in it. |
||
| 53 |
// If current value is 0, then we are setting slot value to type(uint256).max |
||
| 54 |
// Otherwise, we set it to 0. That way, return value should always be affected. |
||
| 55 |
function checkSlotMutatesCall(StdStorage storage self, bytes32 slot) internal returns (bool) {
|
||
| 56 |
bytes32 prevSlotValue = vm.load(self._target, slot); |
||
| 57 |
(bool success, bytes32 prevReturnValue) = callTarget(self); |
||
| 58 | |||
| 59 |
bytes32 testVal = prevReturnValue == bytes32(0) ? bytes32(UINT256_MAX) : bytes32(0); |
||
| 60 |
vm.store(self._target, slot, testVal); |
||
| 61 | |||
| 62 |
(, bytes32 newReturnValue) = callTarget(self); |
||
| 63 | |||
| 64 |
vm.store(self._target, slot, prevSlotValue); |
||
| 65 | |||
| 66 |
return (success && (prevReturnValue != newReturnValue)); |
||
| 67 |
} |
||
| 68 | |||
| 69 |
// Tries setting one of the bits in slot to 1 until return value changes. |
||
| 70 |
// Index of resulted bit is an offset packed slot has from left/right side |
||
| 71 |
function findOffset(StdStorage storage self, bytes32 slot, bool left) internal returns (bool, uint256) {
|
||
| 72 |
for (uint256 offset = 0; offset < 256; offset++) {
|
||
| 73 |
uint256 valueToPut = left ? (1 << (255 - offset)) : (1 << offset); |
||
| 74 |
vm.store(self._target, slot, bytes32(valueToPut)); |
||
| 75 | |||
| 76 |
(bool success, bytes32 data) = callTarget(self); |
||
| 77 | |||
| 78 |
if (success && (uint256(data) > 0)) {
|
||
| 79 |
return (true, offset); |
||
| 80 |
} |
||
| 81 |
} |
||
| 82 |
return (false, 0); |
||
| 83 |
} |
||
| 84 | |||
| 85 |
function findOffsets(StdStorage storage self, bytes32 slot) internal returns (bool, uint256, uint256) {
|
||
| 86 |
bytes32 prevSlotValue = vm.load(self._target, slot); |
||
| 87 | |||
| 88 |
(bool foundLeft, uint256 offsetLeft) = findOffset(self, slot, true); |
||
| 89 |
(bool foundRight, uint256 offsetRight) = findOffset(self, slot, false); |
||
| 90 | |||
| 91 |
// `findOffset` may mutate slot value, so we are setting it to initial value |
||
| 92 |
vm.store(self._target, slot, prevSlotValue); |
||
| 93 |
return (foundLeft && foundRight, offsetLeft, offsetRight); |
||
| 94 |
} |
||
| 95 | |||
| 96 |
function find(StdStorage storage self) internal returns (FindData storage) {
|
||
| 97 |
return find(self, true); |
||
| 98 |
} |
||
| 99 | |||
| 100 |
/// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against |
||
| 101 |
// slot complexity: |
||
| 102 |
// if flat, will be bytes32(uint256(uint)); |
||
| 103 |
// if map, will be keccak256(abi.encode(key, uint(slot))); |
||
| 104 |
// if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot))))); |
||
| 105 |
// if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth); |
||
| 106 |
function find(StdStorage storage self, bool _clear) internal returns (FindData storage) {
|
||
| 107 |
address who = self._target; |
||
| 108 |
bytes4 fsig = self._sig; |
||
| 109 |
uint256 field_depth = self._depth; |
||
| 110 |
bytes memory params = getCallParams(self); |
||
| 111 | |||
| 112 |
// calldata to test against |
||
| 113 |
if (self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found) {
|
||
| 114 |
if (_clear) {
|
||
| 115 |
clear(self); |
||
| 116 |
} |
||
| 117 |
return self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; |
||
| 118 |
} |
||
| 119 |
vm.record(); |
||
| 120 |
(, bytes32 callResult) = callTarget(self); |
||
| 121 |
(bytes32[] memory reads,) = vm.accesses(address(who)); |
||
| 122 | |||
| 123 |
if (reads.length == 0) {
|
||
| 124 |
revert("stdStorage find(StdStorage): No storage use detected for target.");
|
||
| 125 |
} else {
|
||
| 126 |
for (uint256 i = 0; i < reads.length; i++) {
|
||
| 127 |
bytes32 prev = vm.load(who, reads[i]); |
||
| 128 |
if (prev == bytes32(0)) {
|
||
| 129 |
emit WARNING_UninitedSlot(who, uint256(reads[i])); |
||
| 130 |
} |
||
| 131 | |||
| 132 |
if (!checkSlotMutatesCall(self, reads[i])) {
|
||
| 133 |
continue; |
||
| 134 |
} |
||
| 135 | |||
| 136 |
(uint256 offsetLeft, uint256 offsetRight) = (0, 0); |
||
| 137 | |||
| 138 |
if (self._enable_packed_slots) {
|
||
| 139 |
bool found; |
||
| 140 |
(found, offsetLeft, offsetRight) = findOffsets(self, reads[i]); |
||
| 141 |
if (!found) {
|
||
| 142 |
continue; |
||
| 143 |
} |
||
| 144 |
} |
||
| 145 | |||
| 146 |
// Check that value between found offsets is equal to the current call result |
||
| 147 |
uint256 curVal = (uint256(prev) & getMaskByOffsets(offsetLeft, offsetRight)) >> offsetRight; |
||
| 148 | |||
| 149 |
if (uint256(callResult) != curVal) {
|
||
| 150 |
continue; |
||
| 151 |
} |
||
| 152 | |||
| 153 |
emit SlotFound(who, fsig, keccak256(abi.encodePacked(params, field_depth)), uint256(reads[i])); |
||
| 154 |
self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))] = |
||
| 155 |
FindData(uint256(reads[i]), offsetLeft, offsetRight, true); |
||
| 156 |
break; |
||
| 157 |
} |
||
| 158 |
} |
||
| 159 | |||
| 160 |
require( |
||
| 161 |
self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found, |
||
| 162 |
"stdStorage find(StdStorage): Slot(s) not found." |
||
| 163 |
); |
||
| 164 | |||
| 165 |
if (_clear) {
|
||
| 166 |
clear(self); |
||
| 167 |
} |
||
| 168 |
return self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; |
||
| 169 |
} |
||
| 170 | |||
| 171 |
function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {
|
||
| 172 |
self._target = _target; |
||
| 173 |
return self; |
||
| 174 |
} |
||
| 175 | |||
| 176 |
function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {
|
||
| 177 |
self._sig = _sig; |
||
| 178 |
return self; |
||
| 179 |
} |
||
| 180 | |||
| 181 |
function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {
|
||
| 182 |
self._sig = sigs(_sig); |
||
| 183 |
return self; |
||
| 184 |
} |
||
| 185 | |||
| 186 |
function with_calldata(StdStorage storage self, bytes memory _calldata) internal returns (StdStorage storage) {
|
||
| 187 |
self._calldata = _calldata; |
||
| 188 |
return self; |
||
| 189 |
} |
||
| 190 | |||
| 191 |
function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {
|
||
| 192 |
self._keys.push(bytes32(uint256(uint160(who)))); |
||
| 193 |
return self; |
||
| 194 |
} |
||
| 195 | |||
| 196 |
function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {
|
||
| 197 |
self._keys.push(bytes32(amt)); |
||
| 198 |
return self; |
||
| 199 |
} |
||
| 200 | |||
| 201 |
function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {
|
||
| 202 |
self._keys.push(key); |
||
| 203 |
return self; |
||
| 204 |
} |
||
| 205 | |||
| 206 |
function enable_packed_slots(StdStorage storage self) internal returns (StdStorage storage) {
|
||
| 207 |
self._enable_packed_slots = true; |
||
| 208 |
return self; |
||
| 209 |
} |
||
| 210 | |||
| 211 |
function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {
|
||
| 212 |
self._depth = _depth; |
||
| 213 |
return self; |
||
| 214 |
} |
||
| 215 | |||
| 216 |
function read(StdStorage storage self) private returns (bytes memory) {
|
||
| 217 |
FindData storage data = find(self, false); |
||
| 218 |
uint256 mask = getMaskByOffsets(data.offsetLeft, data.offsetRight); |
||
| 219 |
uint256 value = (uint256(vm.load(self._target, bytes32(data.slot))) & mask) >> data.offsetRight; |
||
| 220 |
clear(self); |
||
| 221 |
return abi.encode(value); |
||
| 222 |
} |
||
| 223 | |||
| 224 |
function read_bytes32(StdStorage storage self) internal returns (bytes32) {
|
||
| 225 |
return abi.decode(read(self), (bytes32)); |
||
| 226 |
} |
||
| 227 | |||
| 228 |
function read_bool(StdStorage storage self) internal returns (bool) {
|
||
| 229 |
int256 v = read_int(self); |
||
| 230 |
if (v == 0) return false; |
||
| 231 |
if (v == 1) return true; |
||
| 232 |
revert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.");
|
||
| 233 |
} |
||
| 234 | |||
| 235 |
function read_address(StdStorage storage self) internal returns (address) {
|
||
| 236 |
return abi.decode(read(self), (address)); |
||
| 237 |
} |
||
| 238 | |||
| 239 |
function read_uint(StdStorage storage self) internal returns (uint256) {
|
||
| 240 |
return abi.decode(read(self), (uint256)); |
||
| 241 |
} |
||
| 242 | |||
| 243 |
function read_int(StdStorage storage self) internal returns (int256) {
|
||
| 244 |
return abi.decode(read(self), (int256)); |
||
| 245 |
} |
||
| 246 | |||
| 247 |
function parent(StdStorage storage self) internal returns (uint256, bytes32) {
|
||
| 248 |
address who = self._target; |
||
| 249 |
uint256 field_depth = self._depth; |
||
| 250 |
vm.startMappingRecording(); |
||
| 251 |
uint256 child = find(self, true).slot - field_depth; |
||
| 252 |
(bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child)); |
||
| 253 |
if (!found) {
|
||
| 254 |
revert( |
||
| 255 |
"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called." |
||
| 256 |
); |
||
| 257 |
} |
||
| 258 |
return (uint256(parent_slot), key); |
||
| 259 |
} |
||
| 260 | |||
| 261 |
function root(StdStorage storage self) internal returns (uint256) {
|
||
| 262 |
address who = self._target; |
||
| 263 |
uint256 field_depth = self._depth; |
||
| 264 |
vm.startMappingRecording(); |
||
| 265 |
uint256 child = find(self, true).slot - field_depth; |
||
| 266 |
bool found; |
||
| 267 |
bytes32 root_slot; |
||
| 268 |
bytes32 parent_slot; |
||
| 269 |
(found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child)); |
||
| 270 |
if (!found) {
|
||
| 271 |
revert( |
||
| 272 |
"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called." |
||
| 273 |
); |
||
| 274 |
} |
||
| 275 |
while (found) {
|
||
| 276 |
root_slot = parent_slot; |
||
| 277 |
(found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot)); |
||
| 278 |
} |
||
| 279 |
return uint256(root_slot); |
||
| 280 |
} |
||
| 281 | |||
| 282 |
function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {
|
||
| 283 |
bytes32 out; |
||
| 284 | |||
| 285 |
uint256 max = b.length > 32 ? 32 : b.length; |
||
| 286 |
for (uint256 i = 0; i < max; i++) {
|
||
| 287 |
out |= bytes32(b[offset + i] & 0xFF) >> (i * 8); |
||
| 288 |
} |
||
| 289 |
return out; |
||
| 290 |
} |
||
| 291 | |||
| 292 |
function flatten(bytes32[] memory b) private pure returns (bytes memory) {
|
||
| 293 |
bytes memory result = new bytes(b.length * 32); |
||
| 294 |
for (uint256 i = 0; i < b.length; i++) {
|
||
| 295 |
bytes32 k = b[i]; |
||
| 296 |
/// @solidity memory-safe-assembly |
||
| 297 |
assembly {
|
||
| 298 |
mstore(add(result, add(32, mul(32, i))), k) |
||
| 299 |
} |
||
| 300 |
} |
||
| 301 | |||
| 302 |
return result; |
||
| 303 |
} |
||
| 304 | |||
| 305 |
function clear(StdStorage storage self) internal {
|
||
| 306 |
delete self._target; |
||
| 307 |
delete self._sig; |
||
| 308 |
delete self._keys; |
||
| 309 |
delete self._depth; |
||
| 310 |
delete self._enable_packed_slots; |
||
| 311 |
delete self._calldata; |
||
| 312 |
} |
||
| 313 | |||
| 314 |
// Returns mask which contains non-zero bits for values between `offsetLeft` and `offsetRight` |
||
| 315 |
// (slotValue & mask) >> offsetRight will be the value of the given packed variable |
||
| 316 |
function getMaskByOffsets(uint256 offsetLeft, uint256 offsetRight) internal pure returns (uint256 mask) {
|
||
| 317 |
// mask = ((1 << (256 - (offsetRight + offsetLeft))) - 1) << offsetRight; |
||
| 318 |
// using assembly because (1 << 256) causes overflow |
||
| 319 |
assembly {
|
||
| 320 |
mask := shl(offsetRight, sub(shl(sub(256, add(offsetRight, offsetLeft)), 1), 1)) |
||
| 321 |
} |
||
| 322 |
} |
||
| 323 | |||
| 324 |
// Returns slot value with updated packed variable. |
||
| 325 |
function getUpdatedSlotValue(bytes32 curValue, uint256 varValue, uint256 offsetLeft, uint256 offsetRight) |
||
| 326 |
internal |
||
| 327 |
pure |
||
| 328 |
returns (bytes32 newValue) |
||
| 329 |
{
|
||
| 330 |
return bytes32((uint256(curValue) & ~getMaskByOffsets(offsetLeft, offsetRight)) | (varValue << offsetRight)); |
||
| 331 |
} |
||
| 332 |
} |
||
| 333 | |||
| 334 |
library stdStorage {
|
||
| 335 |
Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code")))));
|
||
| 336 | |||
| 337 |
function sigs(string memory sigStr) internal pure returns (bytes4) {
|
||
| 338 |
return stdStorageSafe.sigs(sigStr); |
||
| 339 |
} |
||
| 340 | |||
| 341 |
function find(StdStorage storage self) internal returns (uint256) {
|
||
| 342 |
return find(self, true); |
||
| 343 |
} |
||
| 344 | |||
| 345 |
function find(StdStorage storage self, bool _clear) internal returns (uint256) {
|
||
| 346 |
return stdStorageSafe.find(self, _clear).slot; |
||
| 347 |
} |
||
| 348 | |||
| 349 |
function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {
|
||
| 350 |
return stdStorageSafe.target(self, _target); |
||
| 351 |
} |
||
| 352 | |||
| 353 |
function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {
|
||
| 354 |
return stdStorageSafe.sig(self, _sig); |
||
| 355 |
} |
||
| 356 | |||
| 357 |
function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {
|
||
| 358 |
return stdStorageSafe.sig(self, _sig); |
||
| 359 |
} |
||
| 360 | |||
| 361 |
function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {
|
||
| 362 |
return stdStorageSafe.with_key(self, who); |
||
| 363 |
} |
||
| 364 | |||
| 365 |
function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {
|
||
| 366 |
return stdStorageSafe.with_key(self, amt); |
||
| 367 |
} |
||
| 368 | |||
| 369 |
function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {
|
||
| 370 |
return stdStorageSafe.with_key(self, key); |
||
| 371 |
} |
||
| 372 | |||
| 373 |
function with_calldata(StdStorage storage self, bytes memory _calldata) internal returns (StdStorage storage) {
|
||
| 374 |
return stdStorageSafe.with_calldata(self, _calldata); |
||
| 375 |
} |
||
| 376 | |||
| 377 |
function enable_packed_slots(StdStorage storage self) internal returns (StdStorage storage) {
|
||
| 378 |
return stdStorageSafe.enable_packed_slots(self); |
||
| 379 |
} |
||
| 380 | |||
| 381 |
function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {
|
||
| 382 |
return stdStorageSafe.depth(self, _depth); |
||
| 383 |
} |
||
| 384 | |||
| 385 |
function clear(StdStorage storage self) internal {
|
||
| 386 |
stdStorageSafe.clear(self); |
||
| 387 |
} |
||
| 388 | |||
| 389 |
function checked_write(StdStorage storage self, address who) internal {
|
||
| 390 |
checked_write(self, bytes32(uint256(uint160(who)))); |
||
| 391 |
} |
||
| 392 | |||
| 393 |
function checked_write(StdStorage storage self, uint256 amt) internal {
|
||
| 394 |
checked_write(self, bytes32(amt)); |
||
| 395 |
} |
||
| 396 | |||
| 397 |
function checked_write_int(StdStorage storage self, int256 val) internal {
|
||
| 398 |
checked_write(self, bytes32(uint256(val))); |
||
| 399 |
} |
||
| 400 | |||
| 401 |
function checked_write(StdStorage storage self, bool write) internal {
|
||
| 402 |
bytes32 t; |
||
| 403 |
/// @solidity memory-safe-assembly |
||
| 404 |
assembly {
|
||
| 405 |
t := write |
||
| 406 |
} |
||
| 407 |
checked_write(self, t); |
||
| 408 |
} |
||
| 409 | |||
| 410 |
function checked_write(StdStorage storage self, bytes32 set) internal {
|
||
| 411 |
address who = self._target; |
||
| 412 |
bytes4 fsig = self._sig; |
||
| 413 |
uint256 field_depth = self._depth; |
||
| 414 |
bytes memory params = stdStorageSafe.getCallParams(self); |
||
| 415 | |||
| 416 |
if (!self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found) {
|
||
| 417 |
find(self, false); |
||
| 418 |
} |
||
| 419 |
FindData storage data = self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; |
||
| 420 |
if ((data.offsetLeft + data.offsetRight) > 0) {
|
||
| 421 |
uint256 maxVal = 2 ** (256 - (data.offsetLeft + data.offsetRight)); |
||
| 422 |
require( |
||
| 423 |
uint256(set) < maxVal, |
||
| 424 |
string( |
||
| 425 |
abi.encodePacked( |
||
| 426 |
"stdStorage find(StdStorage): Packed slot. We can't fit value greater than ", |
||
| 427 |
vm.toString(maxVal) |
||
| 428 |
) |
||
| 429 |
) |
||
| 430 |
); |
||
| 431 |
} |
||
| 432 |
bytes32 curVal = vm.load(who, bytes32(data.slot)); |
||
| 433 |
bytes32 valToSet = stdStorageSafe.getUpdatedSlotValue(curVal, uint256(set), data.offsetLeft, data.offsetRight); |
||
| 434 | |||
| 435 |
vm.store(who, bytes32(data.slot), valToSet); |
||
| 436 | |||
| 437 |
(bool success, bytes32 callResult) = stdStorageSafe.callTarget(self); |
||
| 438 | |||
| 439 |
if (!success || callResult != set) {
|
||
| 440 |
vm.store(who, bytes32(data.slot), curVal); |
||
| 441 |
revert("stdStorage find(StdStorage): Failed to write value.");
|
||
| 442 |
} |
||
| 443 |
clear(self); |
||
| 444 |
} |
||
| 445 | |||
| 446 |
function read_bytes32(StdStorage storage self) internal returns (bytes32) {
|
||
| 447 |
return stdStorageSafe.read_bytes32(self); |
||
| 448 |
} |
||
| 449 | |||
| 450 |
function read_bool(StdStorage storage self) internal returns (bool) {
|
||
| 451 |
return stdStorageSafe.read_bool(self); |
||
| 452 |
} |
||
| 453 | |||
| 454 |
function read_address(StdStorage storage self) internal returns (address) {
|
||
| 455 |
return stdStorageSafe.read_address(self); |
||
| 456 |
} |
||
| 457 | |||
| 458 |
function read_uint(StdStorage storage self) internal returns (uint256) {
|
||
| 459 |
return stdStorageSafe.read_uint(self); |
||
| 460 |
} |
||
| 461 | |||
| 462 |
function read_int(StdStorage storage self) internal returns (int256) {
|
||
| 463 |
return stdStorageSafe.read_int(self); |
||
| 464 |
} |
||
| 465 | |||
| 466 |
function parent(StdStorage storage self) internal returns (uint256, bytes32) {
|
||
| 467 |
return stdStorageSafe.parent(self); |
||
| 468 |
} |
||
| 469 | |||
| 470 |
function root(StdStorage storage self) internal returns (uint256) {
|
||
| 471 |
return stdStorageSafe.root(self); |
||
| 472 |
} |
||
| 473 |
} |
||
| 474 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.4.22 <0.9.0; |
||
| 3 | |||
| 4 |
import {VmSafe} from "./Vm.sol";
|
||
| 5 | |||
| 6 |
library StdStyle {
|
||
| 7 |
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
|
||
| 8 | |||
| 9 |
string constant RED = "\u001b[91m"; |
||
| 10 |
string constant GREEN = "\u001b[92m"; |
||
| 11 |
string constant YELLOW = "\u001b[93m"; |
||
| 12 |
string constant BLUE = "\u001b[94m"; |
||
| 13 |
string constant MAGENTA = "\u001b[95m"; |
||
| 14 |
string constant CYAN = "\u001b[96m"; |
||
| 15 |
string constant BOLD = "\u001b[1m"; |
||
| 16 |
string constant DIM = "\u001b[2m"; |
||
| 17 |
string constant ITALIC = "\u001b[3m"; |
||
| 18 |
string constant UNDERLINE = "\u001b[4m"; |
||
| 19 |
string constant INVERSE = "\u001b[7m"; |
||
| 20 |
string constant RESET = "\u001b[0m"; |
||
| 21 | |||
| 22 |
function styleConcat(string memory style, string memory self) private pure returns (string memory) {
|
||
| 23 |
return string(abi.encodePacked(style, self, RESET)); |
||
| 24 |
} |
||
| 25 | |||
| 26 |
function red(string memory self) internal pure returns (string memory) {
|
||
| 27 |
return styleConcat(RED, self); |
||
| 28 |
} |
||
| 29 | |||
| 30 |
function red(uint256 self) internal pure returns (string memory) {
|
||
| 31 |
return red(vm.toString(self)); |
||
| 32 |
} |
||
| 33 | |||
| 34 |
function red(int256 self) internal pure returns (string memory) {
|
||
| 35 |
return red(vm.toString(self)); |
||
| 36 |
} |
||
| 37 | |||
| 38 |
function red(address self) internal pure returns (string memory) {
|
||
| 39 |
return red(vm.toString(self)); |
||
| 40 |
} |
||
| 41 | |||
| 42 |
function red(bool self) internal pure returns (string memory) {
|
||
| 43 |
return red(vm.toString(self)); |
||
| 44 |
} |
||
| 45 | |||
| 46 |
function redBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 47 |
return red(vm.toString(self)); |
||
| 48 |
} |
||
| 49 | |||
| 50 |
function redBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 51 |
return red(vm.toString(self)); |
||
| 52 |
} |
||
| 53 | |||
| 54 |
function green(string memory self) internal pure returns (string memory) {
|
||
| 55 |
return styleConcat(GREEN, self); |
||
| 56 |
} |
||
| 57 | |||
| 58 |
function green(uint256 self) internal pure returns (string memory) {
|
||
| 59 |
return green(vm.toString(self)); |
||
| 60 |
} |
||
| 61 | |||
| 62 |
function green(int256 self) internal pure returns (string memory) {
|
||
| 63 |
return green(vm.toString(self)); |
||
| 64 |
} |
||
| 65 | |||
| 66 |
function green(address self) internal pure returns (string memory) {
|
||
| 67 |
return green(vm.toString(self)); |
||
| 68 |
} |
||
| 69 | |||
| 70 |
function green(bool self) internal pure returns (string memory) {
|
||
| 71 |
return green(vm.toString(self)); |
||
| 72 |
} |
||
| 73 | |||
| 74 |
function greenBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 75 |
return green(vm.toString(self)); |
||
| 76 |
} |
||
| 77 | |||
| 78 |
function greenBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 79 |
return green(vm.toString(self)); |
||
| 80 |
} |
||
| 81 | |||
| 82 |
function yellow(string memory self) internal pure returns (string memory) {
|
||
| 83 |
return styleConcat(YELLOW, self); |
||
| 84 |
} |
||
| 85 | |||
| 86 |
function yellow(uint256 self) internal pure returns (string memory) {
|
||
| 87 |
return yellow(vm.toString(self)); |
||
| 88 |
} |
||
| 89 | |||
| 90 |
function yellow(int256 self) internal pure returns (string memory) {
|
||
| 91 |
return yellow(vm.toString(self)); |
||
| 92 |
} |
||
| 93 | |||
| 94 |
function yellow(address self) internal pure returns (string memory) {
|
||
| 95 |
return yellow(vm.toString(self)); |
||
| 96 |
} |
||
| 97 | |||
| 98 |
function yellow(bool self) internal pure returns (string memory) {
|
||
| 99 |
return yellow(vm.toString(self)); |
||
| 100 |
} |
||
| 101 | |||
| 102 |
function yellowBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 103 |
return yellow(vm.toString(self)); |
||
| 104 |
} |
||
| 105 | |||
| 106 |
function yellowBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 107 |
return yellow(vm.toString(self)); |
||
| 108 |
} |
||
| 109 | |||
| 110 |
function blue(string memory self) internal pure returns (string memory) {
|
||
| 111 |
return styleConcat(BLUE, self); |
||
| 112 |
} |
||
| 113 | |||
| 114 |
function blue(uint256 self) internal pure returns (string memory) {
|
||
| 115 |
return blue(vm.toString(self)); |
||
| 116 |
} |
||
| 117 | |||
| 118 |
function blue(int256 self) internal pure returns (string memory) {
|
||
| 119 |
return blue(vm.toString(self)); |
||
| 120 |
} |
||
| 121 | |||
| 122 |
function blue(address self) internal pure returns (string memory) {
|
||
| 123 |
return blue(vm.toString(self)); |
||
| 124 |
} |
||
| 125 | |||
| 126 |
function blue(bool self) internal pure returns (string memory) {
|
||
| 127 |
return blue(vm.toString(self)); |
||
| 128 |
} |
||
| 129 | |||
| 130 |
function blueBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 131 |
return blue(vm.toString(self)); |
||
| 132 |
} |
||
| 133 | |||
| 134 |
function blueBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 135 |
return blue(vm.toString(self)); |
||
| 136 |
} |
||
| 137 | |||
| 138 |
function magenta(string memory self) internal pure returns (string memory) {
|
||
| 139 |
return styleConcat(MAGENTA, self); |
||
| 140 |
} |
||
| 141 | |||
| 142 |
function magenta(uint256 self) internal pure returns (string memory) {
|
||
| 143 |
return magenta(vm.toString(self)); |
||
| 144 |
} |
||
| 145 | |||
| 146 |
function magenta(int256 self) internal pure returns (string memory) {
|
||
| 147 |
return magenta(vm.toString(self)); |
||
| 148 |
} |
||
| 149 | |||
| 150 |
function magenta(address self) internal pure returns (string memory) {
|
||
| 151 |
return magenta(vm.toString(self)); |
||
| 152 |
} |
||
| 153 | |||
| 154 |
function magenta(bool self) internal pure returns (string memory) {
|
||
| 155 |
return magenta(vm.toString(self)); |
||
| 156 |
} |
||
| 157 | |||
| 158 |
function magentaBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 159 |
return magenta(vm.toString(self)); |
||
| 160 |
} |
||
| 161 | |||
| 162 |
function magentaBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 163 |
return magenta(vm.toString(self)); |
||
| 164 |
} |
||
| 165 | |||
| 166 |
function cyan(string memory self) internal pure returns (string memory) {
|
||
| 167 |
return styleConcat(CYAN, self); |
||
| 168 |
} |
||
| 169 | |||
| 170 |
function cyan(uint256 self) internal pure returns (string memory) {
|
||
| 171 |
return cyan(vm.toString(self)); |
||
| 172 |
} |
||
| 173 | |||
| 174 |
function cyan(int256 self) internal pure returns (string memory) {
|
||
| 175 |
return cyan(vm.toString(self)); |
||
| 176 |
} |
||
| 177 | |||
| 178 |
function cyan(address self) internal pure returns (string memory) {
|
||
| 179 |
return cyan(vm.toString(self)); |
||
| 180 |
} |
||
| 181 | |||
| 182 |
function cyan(bool self) internal pure returns (string memory) {
|
||
| 183 |
return cyan(vm.toString(self)); |
||
| 184 |
} |
||
| 185 | |||
| 186 |
function cyanBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 187 |
return cyan(vm.toString(self)); |
||
| 188 |
} |
||
| 189 | |||
| 190 |
function cyanBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 191 |
return cyan(vm.toString(self)); |
||
| 192 |
} |
||
| 193 | |||
| 194 |
function bold(string memory self) internal pure returns (string memory) {
|
||
| 195 |
return styleConcat(BOLD, self); |
||
| 196 |
} |
||
| 197 | |||
| 198 |
function bold(uint256 self) internal pure returns (string memory) {
|
||
| 199 |
return bold(vm.toString(self)); |
||
| 200 |
} |
||
| 201 | |||
| 202 |
function bold(int256 self) internal pure returns (string memory) {
|
||
| 203 |
return bold(vm.toString(self)); |
||
| 204 |
} |
||
| 205 | |||
| 206 |
function bold(address self) internal pure returns (string memory) {
|
||
| 207 |
return bold(vm.toString(self)); |
||
| 208 |
} |
||
| 209 | |||
| 210 |
function bold(bool self) internal pure returns (string memory) {
|
||
| 211 |
return bold(vm.toString(self)); |
||
| 212 |
} |
||
| 213 | |||
| 214 |
function boldBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 215 |
return bold(vm.toString(self)); |
||
| 216 |
} |
||
| 217 | |||
| 218 |
function boldBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 219 |
return bold(vm.toString(self)); |
||
| 220 |
} |
||
| 221 | |||
| 222 |
function dim(string memory self) internal pure returns (string memory) {
|
||
| 223 |
return styleConcat(DIM, self); |
||
| 224 |
} |
||
| 225 | |||
| 226 |
function dim(uint256 self) internal pure returns (string memory) {
|
||
| 227 |
return dim(vm.toString(self)); |
||
| 228 |
} |
||
| 229 | |||
| 230 |
function dim(int256 self) internal pure returns (string memory) {
|
||
| 231 |
return dim(vm.toString(self)); |
||
| 232 |
} |
||
| 233 | |||
| 234 |
function dim(address self) internal pure returns (string memory) {
|
||
| 235 |
return dim(vm.toString(self)); |
||
| 236 |
} |
||
| 237 | |||
| 238 |
function dim(bool self) internal pure returns (string memory) {
|
||
| 239 |
return dim(vm.toString(self)); |
||
| 240 |
} |
||
| 241 | |||
| 242 |
function dimBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 243 |
return dim(vm.toString(self)); |
||
| 244 |
} |
||
| 245 | |||
| 246 |
function dimBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 247 |
return dim(vm.toString(self)); |
||
| 248 |
} |
||
| 249 | |||
| 250 |
function italic(string memory self) internal pure returns (string memory) {
|
||
| 251 |
return styleConcat(ITALIC, self); |
||
| 252 |
} |
||
| 253 | |||
| 254 |
function italic(uint256 self) internal pure returns (string memory) {
|
||
| 255 |
return italic(vm.toString(self)); |
||
| 256 |
} |
||
| 257 | |||
| 258 |
function italic(int256 self) internal pure returns (string memory) {
|
||
| 259 |
return italic(vm.toString(self)); |
||
| 260 |
} |
||
| 261 | |||
| 262 |
function italic(address self) internal pure returns (string memory) {
|
||
| 263 |
return italic(vm.toString(self)); |
||
| 264 |
} |
||
| 265 | |||
| 266 |
function italic(bool self) internal pure returns (string memory) {
|
||
| 267 |
return italic(vm.toString(self)); |
||
| 268 |
} |
||
| 269 | |||
| 270 |
function italicBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 271 |
return italic(vm.toString(self)); |
||
| 272 |
} |
||
| 273 | |||
| 274 |
function italicBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 275 |
return italic(vm.toString(self)); |
||
| 276 |
} |
||
| 277 | |||
| 278 |
function underline(string memory self) internal pure returns (string memory) {
|
||
| 279 |
return styleConcat(UNDERLINE, self); |
||
| 280 |
} |
||
| 281 | |||
| 282 |
function underline(uint256 self) internal pure returns (string memory) {
|
||
| 283 |
return underline(vm.toString(self)); |
||
| 284 |
} |
||
| 285 | |||
| 286 |
function underline(int256 self) internal pure returns (string memory) {
|
||
| 287 |
return underline(vm.toString(self)); |
||
| 288 |
} |
||
| 289 | |||
| 290 |
function underline(address self) internal pure returns (string memory) {
|
||
| 291 |
return underline(vm.toString(self)); |
||
| 292 |
} |
||
| 293 | |||
| 294 |
function underline(bool self) internal pure returns (string memory) {
|
||
| 295 |
return underline(vm.toString(self)); |
||
| 296 |
} |
||
| 297 | |||
| 298 |
function underlineBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 299 |
return underline(vm.toString(self)); |
||
| 300 |
} |
||
| 301 | |||
| 302 |
function underlineBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 303 |
return underline(vm.toString(self)); |
||
| 304 |
} |
||
| 305 | |||
| 306 |
function inverse(string memory self) internal pure returns (string memory) {
|
||
| 307 |
return styleConcat(INVERSE, self); |
||
| 308 |
} |
||
| 309 | |||
| 310 |
function inverse(uint256 self) internal pure returns (string memory) {
|
||
| 311 |
return inverse(vm.toString(self)); |
||
| 312 |
} |
||
| 313 | |||
| 314 |
function inverse(int256 self) internal pure returns (string memory) {
|
||
| 315 |
return inverse(vm.toString(self)); |
||
| 316 |
} |
||
| 317 | |||
| 318 |
function inverse(address self) internal pure returns (string memory) {
|
||
| 319 |
return inverse(vm.toString(self)); |
||
| 320 |
} |
||
| 321 | |||
| 322 |
function inverse(bool self) internal pure returns (string memory) {
|
||
| 323 |
return inverse(vm.toString(self)); |
||
| 324 |
} |
||
| 325 | |||
| 326 |
function inverseBytes(bytes memory self) internal pure returns (string memory) {
|
||
| 327 |
return inverse(vm.toString(self)); |
||
| 328 |
} |
||
| 329 | |||
| 330 |
function inverseBytes32(bytes32 self) internal pure returns (string memory) {
|
||
| 331 |
return inverse(vm.toString(self)); |
||
| 332 |
} |
||
| 333 |
} |
||
| 334 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.0 <0.9.0; |
||
| 3 | |||
| 4 |
pragma experimental ABIEncoderV2; |
||
| 5 | |||
| 6 |
import {VmSafe} from "./Vm.sol";
|
||
| 7 | |||
| 8 |
// Helpers for parsing and writing TOML files |
||
| 9 |
// To parse: |
||
| 10 |
// ``` |
||
| 11 |
// using stdToml for string; |
||
| 12 |
// string memory toml = vm.readFile("<some_path>");
|
||
| 13 |
// toml.readUint("<json_path>");
|
||
| 14 |
// ``` |
||
| 15 |
// To write: |
||
| 16 |
// ``` |
||
| 17 |
// using stdToml for string; |
||
| 18 |
// string memory json = "json"; |
||
| 19 |
// json.serialize("a", uint256(123));
|
||
| 20 |
// string memory semiFinal = json.serialize("b", string("test"));
|
||
| 21 |
// string memory finalJson = json.serialize("c", semiFinal);
|
||
| 22 |
// finalJson.write("<some_path>");
|
||
| 23 |
// ``` |
||
| 24 | |||
| 25 |
library stdToml {
|
||
| 26 |
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
|
||
| 27 | |||
| 28 |
function parseRaw(string memory toml, string memory key) internal pure returns (bytes memory) {
|
||
| 29 |
return vm.parseToml(toml, key); |
||
| 30 |
} |
||
| 31 | |||
| 32 |
function readUint(string memory toml, string memory key) internal pure returns (uint256) {
|
||
| 33 |
return vm.parseTomlUint(toml, key); |
||
| 34 |
} |
||
| 35 | |||
| 36 |
function readUintArray(string memory toml, string memory key) internal pure returns (uint256[] memory) {
|
||
| 37 |
return vm.parseTomlUintArray(toml, key); |
||
| 38 |
} |
||
| 39 | |||
| 40 |
function readInt(string memory toml, string memory key) internal pure returns (int256) {
|
||
| 41 |
return vm.parseTomlInt(toml, key); |
||
| 42 |
} |
||
| 43 | |||
| 44 |
function readIntArray(string memory toml, string memory key) internal pure returns (int256[] memory) {
|
||
| 45 |
return vm.parseTomlIntArray(toml, key); |
||
| 46 |
} |
||
| 47 | |||
| 48 |
function readBytes32(string memory toml, string memory key) internal pure returns (bytes32) {
|
||
| 49 |
return vm.parseTomlBytes32(toml, key); |
||
| 50 |
} |
||
| 51 | |||
| 52 |
function readBytes32Array(string memory toml, string memory key) internal pure returns (bytes32[] memory) {
|
||
| 53 |
return vm.parseTomlBytes32Array(toml, key); |
||
| 54 |
} |
||
| 55 | |||
| 56 |
function readString(string memory toml, string memory key) internal pure returns (string memory) {
|
||
| 57 |
return vm.parseTomlString(toml, key); |
||
| 58 |
} |
||
| 59 | |||
| 60 |
function readStringArray(string memory toml, string memory key) internal pure returns (string[] memory) {
|
||
| 61 |
return vm.parseTomlStringArray(toml, key); |
||
| 62 |
} |
||
| 63 | |||
| 64 |
function readAddress(string memory toml, string memory key) internal pure returns (address) {
|
||
| 65 |
return vm.parseTomlAddress(toml, key); |
||
| 66 |
} |
||
| 67 | |||
| 68 |
function readAddressArray(string memory toml, string memory key) internal pure returns (address[] memory) {
|
||
| 69 |
return vm.parseTomlAddressArray(toml, key); |
||
| 70 |
} |
||
| 71 | |||
| 72 |
function readBool(string memory toml, string memory key) internal pure returns (bool) {
|
||
| 73 |
return vm.parseTomlBool(toml, key); |
||
| 74 |
} |
||
| 75 | |||
| 76 |
function readBoolArray(string memory toml, string memory key) internal pure returns (bool[] memory) {
|
||
| 77 |
return vm.parseTomlBoolArray(toml, key); |
||
| 78 |
} |
||
| 79 | |||
| 80 |
function readBytes(string memory toml, string memory key) internal pure returns (bytes memory) {
|
||
| 81 |
return vm.parseTomlBytes(toml, key); |
||
| 82 |
} |
||
| 83 | |||
| 84 |
function readBytesArray(string memory toml, string memory key) internal pure returns (bytes[] memory) {
|
||
| 85 |
return vm.parseTomlBytesArray(toml, key); |
||
| 86 |
} |
||
| 87 | |||
| 88 |
function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {
|
||
| 89 |
return vm.serializeJson(jsonKey, rootObject); |
||
| 90 |
} |
||
| 91 | |||
| 92 |
function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {
|
||
| 93 |
return vm.serializeBool(jsonKey, key, value); |
||
| 94 |
} |
||
| 95 | |||
| 96 |
function serialize(string memory jsonKey, string memory key, bool[] memory value) |
||
| 97 |
internal |
||
| 98 |
returns (string memory) |
||
| 99 |
{
|
||
| 100 |
return vm.serializeBool(jsonKey, key, value); |
||
| 101 |
} |
||
| 102 | |||
| 103 |
function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {
|
||
| 104 |
return vm.serializeUint(jsonKey, key, value); |
||
| 105 |
} |
||
| 106 | |||
| 107 |
function serialize(string memory jsonKey, string memory key, uint256[] memory value) |
||
| 108 |
internal |
||
| 109 |
returns (string memory) |
||
| 110 |
{
|
||
| 111 |
return vm.serializeUint(jsonKey, key, value); |
||
| 112 |
} |
||
| 113 | |||
| 114 |
function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {
|
||
| 115 |
return vm.serializeInt(jsonKey, key, value); |
||
| 116 |
} |
||
| 117 | |||
| 118 |
function serialize(string memory jsonKey, string memory key, int256[] memory value) |
||
| 119 |
internal |
||
| 120 |
returns (string memory) |
||
| 121 |
{
|
||
| 122 |
return vm.serializeInt(jsonKey, key, value); |
||
| 123 |
} |
||
| 124 | |||
| 125 |
function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {
|
||
| 126 |
return vm.serializeAddress(jsonKey, key, value); |
||
| 127 |
} |
||
| 128 | |||
| 129 |
function serialize(string memory jsonKey, string memory key, address[] memory value) |
||
| 130 |
internal |
||
| 131 |
returns (string memory) |
||
| 132 |
{
|
||
| 133 |
return vm.serializeAddress(jsonKey, key, value); |
||
| 134 |
} |
||
| 135 | |||
| 136 |
function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {
|
||
| 137 |
return vm.serializeBytes32(jsonKey, key, value); |
||
| 138 |
} |
||
| 139 | |||
| 140 |
function serialize(string memory jsonKey, string memory key, bytes32[] memory value) |
||
| 141 |
internal |
||
| 142 |
returns (string memory) |
||
| 143 |
{
|
||
| 144 |
return vm.serializeBytes32(jsonKey, key, value); |
||
| 145 |
} |
||
| 146 | |||
| 147 |
function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {
|
||
| 148 |
return vm.serializeBytes(jsonKey, key, value); |
||
| 149 |
} |
||
| 150 | |||
| 151 |
function serialize(string memory jsonKey, string memory key, bytes[] memory value) |
||
| 152 |
internal |
||
| 153 |
returns (string memory) |
||
| 154 |
{
|
||
| 155 |
return vm.serializeBytes(jsonKey, key, value); |
||
| 156 |
} |
||
| 157 | |||
| 158 |
function serialize(string memory jsonKey, string memory key, string memory value) |
||
| 159 |
internal |
||
| 160 |
returns (string memory) |
||
| 161 |
{
|
||
| 162 |
return vm.serializeString(jsonKey, key, value); |
||
| 163 |
} |
||
| 164 | |||
| 165 |
function serialize(string memory jsonKey, string memory key, string[] memory value) |
||
| 166 |
internal |
||
| 167 |
returns (string memory) |
||
| 168 |
{
|
||
| 169 |
return vm.serializeString(jsonKey, key, value); |
||
| 170 |
} |
||
| 171 | |||
| 172 |
function write(string memory jsonKey, string memory path) internal {
|
||
| 173 |
vm.writeToml(jsonKey, path); |
||
| 174 |
} |
||
| 175 | |||
| 176 |
function write(string memory jsonKey, string memory path, string memory valueKey) internal {
|
||
| 177 |
vm.writeToml(jsonKey, path, valueKey); |
||
| 178 |
} |
||
| 179 |
} |
||
| 180 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
pragma experimental ABIEncoderV2; |
||
| 5 | |||
| 6 |
import {IMulticall3} from "./interfaces/IMulticall3.sol";
|
||
| 7 |
import {MockERC20} from "./mocks/MockERC20.sol";
|
||
| 8 |
import {MockERC721} from "./mocks/MockERC721.sol";
|
||
| 9 |
import {VmSafe} from "./Vm.sol";
|
||
| 10 | |||
| 11 |
abstract contract StdUtils {
|
||
| 12 |
/*////////////////////////////////////////////////////////////////////////// |
||
| 13 |
CONSTANTS |
||
| 14 |
//////////////////////////////////////////////////////////////////////////*/ |
||
| 15 | |||
| 16 |
IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11); |
||
| 17 |
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
|
||
| 18 |
address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; |
||
| 19 |
uint256 private constant INT256_MIN_ABS = |
||
| 20 |
57896044618658097711785492504343953926634992332820282019728792003956564819968; |
||
| 21 |
uint256 private constant SECP256K1_ORDER = |
||
| 22 |
115792089237316195423570985008687907852837564279074904382605163141518161494337; |
||
| 23 |
uint256 private constant UINT256_MAX = |
||
| 24 |
115792089237316195423570985008687907853269984665640564039457584007913129639935; |
||
| 25 | |||
| 26 |
// Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy. |
||
| 27 |
address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C; |
||
| 28 | |||
| 29 |
/*////////////////////////////////////////////////////////////////////////// |
||
| 30 |
INTERNAL FUNCTIONS |
||
| 31 |
//////////////////////////////////////////////////////////////////////////*/ |
||
| 32 | |||
| 33 |
function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {
|
||
| 34 |
require(min <= max, "StdUtils bound(uint256,uint256,uint256): Max is less than min."); |
||
| 35 |
// If x is between min and max, return x directly. This is to ensure that dictionary values |
||
| 36 |
// do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188 |
||
| 37 |
if (x >= min && x <= max) return x; |
||
| 38 | |||
| 39 |
uint256 size = max - min + 1; |
||
| 40 | |||
| 41 |
// If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side. |
||
| 42 |
// This helps ensure coverage of the min/max values. |
||
| 43 |
if (x <= 3 && size > x) return min + x; |
||
| 44 |
if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x); |
||
| 45 | |||
| 46 |
// Otherwise, wrap x into the range [min, max], i.e. the range is inclusive. |
||
| 47 |
if (x > max) {
|
||
| 48 |
uint256 diff = x - max; |
||
| 49 |
uint256 rem = diff % size; |
||
| 50 |
if (rem == 0) return max; |
||
| 51 |
result = min + rem - 1; |
||
| 52 |
} else if (x < min) {
|
||
| 53 |
uint256 diff = min - x; |
||
| 54 |
uint256 rem = diff % size; |
||
| 55 |
if (rem == 0) return min; |
||
| 56 |
result = max - rem + 1; |
||
| 57 |
} |
||
| 58 |
} |
||
| 59 | |||
| 60 |
function bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {
|
||
| 61 |
result = _bound(x, min, max); |
||
| 62 |
console2_log_StdUtils("Bound Result", result);
|
||
| 63 |
} |
||
| 64 | |||
| 65 |
function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {
|
||
| 66 |
require(min <= max, "StdUtils bound(int256,int256,int256): Max is less than min."); |
||
| 67 | |||
| 68 |
// Shifting all int256 values to uint256 to use _bound function. The range of two types are: |
||
| 69 |
// int256 : -(2**255) ~ (2**255 - 1) |
||
| 70 |
// uint256: 0 ~ (2**256 - 1) |
||
| 71 |
// So, add 2**255, INT256_MIN_ABS to the integer values. |
||
| 72 |
// |
||
| 73 |
// If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow. |
||
| 74 |
// So, use `~uint256(x) + 1` instead. |
||
| 75 |
uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS); |
||
| 76 |
uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS); |
||
| 77 |
uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS); |
||
| 78 | |||
| 79 |
uint256 y = _bound(_x, _min, _max); |
||
| 80 | |||
| 81 |
// To move it back to int256 value, subtract INT256_MIN_ABS at here. |
||
| 82 |
result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS); |
||
| 83 |
} |
||
| 84 | |||
| 85 |
function bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {
|
||
| 86 |
result = _bound(x, min, max); |
||
| 87 |
console2_log_StdUtils("Bound result", vm.toString(result));
|
||
| 88 |
} |
||
| 89 | |||
| 90 |
function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {
|
||
| 91 |
result = _bound(privateKey, 1, SECP256K1_ORDER - 1); |
||
| 92 |
} |
||
| 93 | |||
| 94 |
function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {
|
||
| 95 |
require(b.length <= 32, "StdUtils bytesToUint(bytes): Bytes length exceeds 32."); |
||
| 96 |
return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256)); |
||
| 97 |
} |
||
| 98 | |||
| 99 |
/// @dev Compute the address a contract will be deployed at for a given deployer address and nonce |
||
| 100 |
/// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol) |
||
| 101 |
function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {
|
||
| 102 |
console2_log_StdUtils("computeCreateAddress is deprecated. Please use vm.computeCreateAddress instead.");
|
||
| 103 |
return vm.computeCreateAddress(deployer, nonce); |
||
| 104 |
} |
||
| 105 | |||
| 106 |
function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer) |
||
| 107 |
internal |
||
| 108 |
pure |
||
| 109 |
virtual |
||
| 110 |
returns (address) |
||
| 111 |
{
|
||
| 112 |
console2_log_StdUtils("computeCreate2Address is deprecated. Please use vm.computeCreate2Address instead.");
|
||
| 113 |
return vm.computeCreate2Address(salt, initcodeHash, deployer); |
||
| 114 |
} |
||
| 115 | |||
| 116 |
/// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer |
||
| 117 |
function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {
|
||
| 118 |
console2_log_StdUtils("computeCreate2Address is deprecated. Please use vm.computeCreate2Address instead.");
|
||
| 119 |
return vm.computeCreate2Address(salt, initCodeHash); |
||
| 120 |
} |
||
| 121 | |||
| 122 |
/// @dev returns an initialized mock ERC20 contract |
||
| 123 |
function deployMockERC20(string memory name, string memory symbol, uint8 decimals) |
||
| 124 |
internal |
||
| 125 |
returns (MockERC20 mock) |
||
| 126 |
{
|
||
| 127 |
mock = new MockERC20(); |
||
| 128 |
mock.initialize(name, symbol, decimals); |
||
| 129 |
} |
||
| 130 | |||
| 131 |
/// @dev returns an initialized mock ERC721 contract |
||
| 132 |
function deployMockERC721(string memory name, string memory symbol) internal returns (MockERC721 mock) {
|
||
| 133 |
mock = new MockERC721(); |
||
| 134 |
mock.initialize(name, symbol); |
||
| 135 |
} |
||
| 136 | |||
| 137 |
/// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments |
||
| 138 |
/// @param creationCode the creation code of a contract C, as returned by type(C).creationCode |
||
| 139 |
function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {
|
||
| 140 |
return hashInitCode(creationCode, ""); |
||
| 141 |
} |
||
| 142 | |||
| 143 |
/// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2 |
||
| 144 |
/// @param creationCode the creation code of a contract C, as returned by type(C).creationCode |
||
| 145 |
/// @param args the ABI-encoded arguments to the constructor of C |
||
| 146 |
function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {
|
||
| 147 |
return keccak256(abi.encodePacked(creationCode, args)); |
||
| 148 |
} |
||
| 149 | |||
| 150 |
// Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses. |
||
| 151 |
function getTokenBalances(address token, address[] memory addresses) |
||
| 152 |
internal |
||
| 153 |
virtual |
||
| 154 |
returns (uint256[] memory balances) |
||
| 155 |
{
|
||
| 156 |
uint256 tokenCodeSize; |
||
| 157 |
assembly {
|
||
| 158 |
tokenCodeSize := extcodesize(token) |
||
| 159 |
} |
||
| 160 |
require(tokenCodeSize > 0, "StdUtils getTokenBalances(address,address[]): Token address is not a contract."); |
||
| 161 | |||
| 162 |
// ABI encode the aggregate call to Multicall3. |
||
| 163 |
uint256 length = addresses.length; |
||
| 164 |
IMulticall3.Call[] memory calls = new IMulticall3.Call[](length); |
||
| 165 |
for (uint256 i = 0; i < length; ++i) {
|
||
| 166 |
// 0x70a08231 = bytes4("balanceOf(address)"))
|
||
| 167 |
calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});
|
||
| 168 |
} |
||
| 169 | |||
| 170 |
// Make the aggregate call. |
||
| 171 |
(, bytes[] memory returnData) = multicall.aggregate(calls); |
||
| 172 | |||
| 173 |
// ABI decode the return data and return the balances. |
||
| 174 |
balances = new uint256[](length); |
||
| 175 |
for (uint256 i = 0; i < length; ++i) {
|
||
| 176 |
balances[i] = abi.decode(returnData[i], (uint256)); |
||
| 177 |
} |
||
| 178 |
} |
||
| 179 | |||
| 180 |
/*////////////////////////////////////////////////////////////////////////// |
||
| 181 |
PRIVATE FUNCTIONS |
||
| 182 |
//////////////////////////////////////////////////////////////////////////*/ |
||
| 183 | |||
| 184 |
function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {
|
||
| 185 |
return address(uint160(uint256(bytesValue))); |
||
| 186 |
} |
||
| 187 | |||
| 188 |
// This section is used to prevent the compilation of console, which shortens the compilation time when console is |
||
| 189 |
// not used elsewhere. We also trick the compiler into letting us make the console log methods as `pure` to avoid |
||
| 190 |
// any breaking changes to function signatures. |
||
| 191 |
function _castLogPayloadViewToPure(function(bytes memory) internal view fnIn) |
||
| 192 |
internal |
||
| 193 |
pure |
||
| 194 |
returns (function(bytes memory) internal pure fnOut) |
||
| 195 |
{
|
||
| 196 |
assembly {
|
||
| 197 |
fnOut := fnIn |
||
| 198 |
} |
||
| 199 |
} |
||
| 200 | |||
| 201 |
function _sendLogPayload(bytes memory payload) internal pure {
|
||
| 202 |
_castLogPayloadViewToPure(_sendLogPayloadView)(payload); |
||
| 203 |
} |
||
| 204 | |||
| 205 |
function _sendLogPayloadView(bytes memory payload) private view {
|
||
| 206 |
uint256 payloadLength = payload.length; |
||
| 207 |
address consoleAddress = CONSOLE2_ADDRESS; |
||
| 208 |
/// @solidity memory-safe-assembly |
||
| 209 |
assembly {
|
||
| 210 |
let payloadStart := add(payload, 32) |
||
| 211 |
let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) |
||
| 212 |
} |
||
| 213 |
} |
||
| 214 | |||
| 215 |
function console2_log_StdUtils(string memory p0) private pure {
|
||
| 216 |
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
|
||
| 217 |
} |
||
| 218 | |||
| 219 |
function console2_log_StdUtils(string memory p0, uint256 p1) private pure {
|
||
| 220 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1));
|
||
| 221 |
} |
||
| 222 | |||
| 223 |
function console2_log_StdUtils(string memory p0, string memory p1) private pure {
|
||
| 224 |
_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
|
||
| 225 |
} |
||
| 226 |
} |
||
| 227 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
pragma experimental ABIEncoderV2; |
||
| 5 | |||
| 6 |
// 💬 ABOUT |
||
| 7 |
// Forge Std's default Test. |
||
| 8 | |||
| 9 |
// 🧩 MODULES |
||
| 10 |
import {console} from "./console.sol";
|
||
| 11 |
import {console2} from "./console2.sol";
|
||
| 12 |
import {safeconsole} from "./safeconsole.sol";
|
||
| 13 |
import {StdAssertions} from "./StdAssertions.sol";
|
||
| 14 |
import {StdChains} from "./StdChains.sol";
|
||
| 15 |
import {StdCheats} from "./StdCheats.sol";
|
||
| 16 |
import {stdError} from "./StdError.sol";
|
||
| 17 |
import {StdInvariant} from "./StdInvariant.sol";
|
||
| 18 |
import {stdJson} from "./StdJson.sol";
|
||
| 19 |
import {stdMath} from "./StdMath.sol";
|
||
| 20 |
import {StdStorage, stdStorage} from "./StdStorage.sol";
|
||
| 21 |
import {StdStyle} from "./StdStyle.sol";
|
||
| 22 |
import {stdToml} from "./StdToml.sol";
|
||
| 23 |
import {StdUtils} from "./StdUtils.sol";
|
||
| 24 |
import {Vm} from "./Vm.sol";
|
||
| 25 | |||
| 26 |
// 📦 BOILERPLATE |
||
| 27 |
import {TestBase} from "./Base.sol";
|
||
| 28 | |||
| 29 |
// ⭐️ TEST |
||
| 30 |
abstract contract Test is TestBase, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {
|
||
| 31 |
// Note: IS_TEST() must return true. |
||
| 32 |
bool public IS_TEST = true; |
||
| 33 |
} |
||
| 34 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// Automatically @generated by scripts/vm.py. Do not modify manually. |
||
| 2 | |||
| 3 |
// SPDX-License-Identifier: MIT OR Apache-2.0 |
||
| 4 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 5 |
pragma experimental ABIEncoderV2; |
||
| 6 | |||
| 7 |
/// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may |
||
| 8 |
/// result in Script simulations differing from on-chain execution. It is recommended to only use |
||
| 9 |
/// these cheats in scripts. |
||
| 10 |
interface VmSafe {
|
||
| 11 |
/// A modification applied to either `msg.sender` or `tx.origin`. Returned by `readCallers`. |
||
| 12 |
enum CallerMode {
|
||
| 13 |
// No caller modification is currently active. |
||
| 14 |
None, |
||
| 15 |
// A one time broadcast triggered by a `vm.broadcast()` call is currently active. |
||
| 16 |
Broadcast, |
||
| 17 |
// A recurrent broadcast triggered by a `vm.startBroadcast()` call is currently active. |
||
| 18 |
RecurrentBroadcast, |
||
| 19 |
// A one time prank triggered by a `vm.prank()` call is currently active. |
||
| 20 |
Prank, |
||
| 21 |
// A recurrent prank triggered by a `vm.startPrank()` call is currently active. |
||
| 22 |
RecurrentPrank |
||
| 23 |
} |
||
| 24 | |||
| 25 |
/// The kind of account access that occurred. |
||
| 26 |
enum AccountAccessKind {
|
||
| 27 |
// The account was called. |
||
| 28 |
Call, |
||
| 29 |
// The account was called via delegatecall. |
||
| 30 |
DelegateCall, |
||
| 31 |
// The account was called via callcode. |
||
| 32 |
CallCode, |
||
| 33 |
// The account was called via staticcall. |
||
| 34 |
StaticCall, |
||
| 35 |
// The account was created. |
||
| 36 |
Create, |
||
| 37 |
// The account was selfdestructed. |
||
| 38 |
SelfDestruct, |
||
| 39 |
// Synthetic access indicating the current context has resumed after a previous sub-context (AccountAccess). |
||
| 40 |
Resume, |
||
| 41 |
// The account's balance was read. |
||
| 42 |
Balance, |
||
| 43 |
// The account's codesize was read. |
||
| 44 |
Extcodesize, |
||
| 45 |
// The account's codehash was read. |
||
| 46 |
Extcodehash, |
||
| 47 |
// The account's code was copied. |
||
| 48 |
Extcodecopy |
||
| 49 |
} |
||
| 50 | |||
| 51 |
/// An Ethereum log. Returned by `getRecordedLogs`. |
||
| 52 |
struct Log {
|
||
| 53 |
// The topics of the log, including the signature, if any. |
||
| 54 |
bytes32[] topics; |
||
| 55 |
// The raw data of the log. |
||
| 56 |
bytes data; |
||
| 57 |
// The address of the log's emitter. |
||
| 58 |
address emitter; |
||
| 59 |
} |
||
| 60 | |||
| 61 |
/// An RPC URL and its alias. Returned by `rpcUrlStructs`. |
||
| 62 |
struct Rpc {
|
||
| 63 |
// The alias of the RPC URL. |
||
| 64 |
string key; |
||
| 65 |
// The RPC URL. |
||
| 66 |
string url; |
||
| 67 |
} |
||
| 68 | |||
| 69 |
/// An RPC log object. Returned by `eth_getLogs`. |
||
| 70 |
struct EthGetLogs {
|
||
| 71 |
// The address of the log's emitter. |
||
| 72 |
address emitter; |
||
| 73 |
// The topics of the log, including the signature, if any. |
||
| 74 |
bytes32[] topics; |
||
| 75 |
// The raw data of the log. |
||
| 76 |
bytes data; |
||
| 77 |
// The block hash. |
||
| 78 |
bytes32 blockHash; |
||
| 79 |
// The block number. |
||
| 80 |
uint64 blockNumber; |
||
| 81 |
// The transaction hash. |
||
| 82 |
bytes32 transactionHash; |
||
| 83 |
// The transaction index in the block. |
||
| 84 |
uint64 transactionIndex; |
||
| 85 |
// The log index. |
||
| 86 |
uint256 logIndex; |
||
| 87 |
// Whether the log was removed. |
||
| 88 |
bool removed; |
||
| 89 |
} |
||
| 90 | |||
| 91 |
/// A single entry in a directory listing. Returned by `readDir`. |
||
| 92 |
struct DirEntry {
|
||
| 93 |
// The error message, if any. |
||
| 94 |
string errorMessage; |
||
| 95 |
// The path of the entry. |
||
| 96 |
string path; |
||
| 97 |
// The depth of the entry. |
||
| 98 |
uint64 depth; |
||
| 99 |
// Whether the entry is a directory. |
||
| 100 |
bool isDir; |
||
| 101 |
// Whether the entry is a symlink. |
||
| 102 |
bool isSymlink; |
||
| 103 |
} |
||
| 104 | |||
| 105 |
/// Metadata information about a file. |
||
| 106 |
/// This structure is returned from the `fsMetadata` function and represents known |
||
| 107 |
/// metadata about a file such as its permissions, size, modification |
||
| 108 |
/// times, etc. |
||
| 109 |
struct FsMetadata {
|
||
| 110 |
// True if this metadata is for a directory. |
||
| 111 |
bool isDir; |
||
| 112 |
// True if this metadata is for a symlink. |
||
| 113 |
bool isSymlink; |
||
| 114 |
// The size of the file, in bytes, this metadata is for. |
||
| 115 |
uint256 length; |
||
| 116 |
// True if this metadata is for a readonly (unwritable) file. |
||
| 117 |
bool readOnly; |
||
| 118 |
// The last modification time listed in this metadata. |
||
| 119 |
uint256 modified; |
||
| 120 |
// The last access time of this metadata. |
||
| 121 |
uint256 accessed; |
||
| 122 |
// The creation time listed in this metadata. |
||
| 123 |
uint256 created; |
||
| 124 |
} |
||
| 125 | |||
| 126 |
/// A wallet with a public and private key. |
||
| 127 |
struct Wallet {
|
||
| 128 |
// The wallet's address. |
||
| 129 |
address addr; |
||
| 130 |
// The wallet's public key `X`. |
||
| 131 |
uint256 publicKeyX; |
||
| 132 |
// The wallet's public key `Y`. |
||
| 133 |
uint256 publicKeyY; |
||
| 134 |
// The wallet's private key. |
||
| 135 |
uint256 privateKey; |
||
| 136 |
} |
||
| 137 | |||
| 138 |
/// The result of a `tryFfi` call. |
||
| 139 |
struct FfiResult {
|
||
| 140 |
// The exit code of the call. |
||
| 141 |
int32 exitCode; |
||
| 142 |
// The optionally hex-decoded `stdout` data. |
||
| 143 |
bytes stdout; |
||
| 144 |
// The `stderr` data. |
||
| 145 |
bytes stderr; |
||
| 146 |
} |
||
| 147 | |||
| 148 |
/// Information on the chain and fork. |
||
| 149 |
struct ChainInfo {
|
||
| 150 |
// The fork identifier. Set to zero if no fork is active. |
||
| 151 |
uint256 forkId; |
||
| 152 |
// The chain ID of the current fork. |
||
| 153 |
uint256 chainId; |
||
| 154 |
} |
||
| 155 | |||
| 156 |
/// The result of a `stopAndReturnStateDiff` call. |
||
| 157 |
struct AccountAccess {
|
||
| 158 |
// The chain and fork the access occurred. |
||
| 159 |
ChainInfo chainInfo; |
||
| 160 |
// The kind of account access that determines what the account is. |
||
| 161 |
// If kind is Call, DelegateCall, StaticCall or CallCode, then the account is the callee. |
||
| 162 |
// If kind is Create, then the account is the newly created account. |
||
| 163 |
// If kind is SelfDestruct, then the account is the selfdestruct recipient. |
||
| 164 |
// If kind is a Resume, then account represents a account context that has resumed. |
||
| 165 |
AccountAccessKind kind; |
||
| 166 |
// The account that was accessed. |
||
| 167 |
// It's either the account created, callee or a selfdestruct recipient for CREATE, CALL or SELFDESTRUCT. |
||
| 168 |
address account; |
||
| 169 |
// What accessed the account. |
||
| 170 |
address accessor; |
||
| 171 |
// If the account was initialized or empty prior to the access. |
||
| 172 |
// An account is considered initialized if it has code, a |
||
| 173 |
// non-zero nonce, or a non-zero balance. |
||
| 174 |
bool initialized; |
||
| 175 |
// The previous balance of the accessed account. |
||
| 176 |
uint256 oldBalance; |
||
| 177 |
// The potential new balance of the accessed account. |
||
| 178 |
// That is, all balance changes are recorded here, even if reverts occurred. |
||
| 179 |
uint256 newBalance; |
||
| 180 |
// Code of the account deployed by CREATE. |
||
| 181 |
bytes deployedCode; |
||
| 182 |
// Value passed along with the account access |
||
| 183 |
uint256 value; |
||
| 184 |
// Input data provided to the CREATE or CALL |
||
| 185 |
bytes data; |
||
| 186 |
// If this access reverted in either the current or parent context. |
||
| 187 |
bool reverted; |
||
| 188 |
// An ordered list of storage accesses made during an account access operation. |
||
| 189 |
StorageAccess[] storageAccesses; |
||
| 190 |
// Call depth traversed during the recording of state differences |
||
| 191 |
uint64 depth; |
||
| 192 |
} |
||
| 193 | |||
| 194 |
/// The storage accessed during an `AccountAccess`. |
||
| 195 |
struct StorageAccess {
|
||
| 196 |
// The account whose storage was accessed. |
||
| 197 |
address account; |
||
| 198 |
// The slot that was accessed. |
||
| 199 |
bytes32 slot; |
||
| 200 |
// If the access was a write. |
||
| 201 |
bool isWrite; |
||
| 202 |
// The previous value of the slot. |
||
| 203 |
bytes32 previousValue; |
||
| 204 |
// The new value of the slot. |
||
| 205 |
bytes32 newValue; |
||
| 206 |
// If the access was reverted. |
||
| 207 |
bool reverted; |
||
| 208 |
} |
||
| 209 | |||
| 210 |
// ======== Environment ======== |
||
| 211 | |||
| 212 |
/// Gets the environment variable `name` and parses it as `address`. |
||
| 213 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 214 |
function envAddress(string calldata name) external view returns (address value); |
||
| 215 | |||
| 216 |
/// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`. |
||
| 217 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 218 |
function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value); |
||
| 219 | |||
| 220 |
/// Gets the environment variable `name` and parses it as `bool`. |
||
| 221 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 222 |
function envBool(string calldata name) external view returns (bool value); |
||
| 223 | |||
| 224 |
/// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`. |
||
| 225 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 226 |
function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value); |
||
| 227 | |||
| 228 |
/// Gets the environment variable `name` and parses it as `bytes32`. |
||
| 229 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 230 |
function envBytes32(string calldata name) external view returns (bytes32 value); |
||
| 231 | |||
| 232 |
/// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`. |
||
| 233 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 234 |
function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value); |
||
| 235 | |||
| 236 |
/// Gets the environment variable `name` and parses it as `bytes`. |
||
| 237 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 238 |
function envBytes(string calldata name) external view returns (bytes memory value); |
||
| 239 | |||
| 240 |
/// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`. |
||
| 241 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 242 |
function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value); |
||
| 243 | |||
| 244 |
/// Gets the environment variable `name` and parses it as `int256`. |
||
| 245 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 246 |
function envInt(string calldata name) external view returns (int256 value); |
||
| 247 | |||
| 248 |
/// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`. |
||
| 249 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 250 |
function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value); |
||
| 251 | |||
| 252 |
/// Gets the environment variable `name` and parses it as `bool`. |
||
| 253 |
/// Reverts if the variable could not be parsed. |
||
| 254 |
/// Returns `defaultValue` if the variable was not found. |
||
| 255 |
function envOr(string calldata name, bool defaultValue) external view returns (bool value); |
||
| 256 | |||
| 257 |
/// Gets the environment variable `name` and parses it as `uint256`. |
||
| 258 |
/// Reverts if the variable could not be parsed. |
||
| 259 |
/// Returns `defaultValue` if the variable was not found. |
||
| 260 |
function envOr(string calldata name, uint256 defaultValue) external view returns (uint256 value); |
||
| 261 | |||
| 262 |
/// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`. |
||
| 263 |
/// Reverts if the variable could not be parsed. |
||
| 264 |
/// Returns `defaultValue` if the variable was not found. |
||
| 265 |
function envOr(string calldata name, string calldata delim, address[] calldata defaultValue) |
||
| 266 |
external |
||
| 267 |
view |
||
| 268 |
returns (address[] memory value); |
||
| 269 | |||
| 270 |
/// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`. |
||
| 271 |
/// Reverts if the variable could not be parsed. |
||
| 272 |
/// Returns `defaultValue` if the variable was not found. |
||
| 273 |
function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue) |
||
| 274 |
external |
||
| 275 |
view |
||
| 276 |
returns (bytes32[] memory value); |
||
| 277 | |||
| 278 |
/// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`. |
||
| 279 |
/// Reverts if the variable could not be parsed. |
||
| 280 |
/// Returns `defaultValue` if the variable was not found. |
||
| 281 |
function envOr(string calldata name, string calldata delim, string[] calldata defaultValue) |
||
| 282 |
external |
||
| 283 |
view |
||
| 284 |
returns (string[] memory value); |
||
| 285 | |||
| 286 |
/// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`. |
||
| 287 |
/// Reverts if the variable could not be parsed. |
||
| 288 |
/// Returns `defaultValue` if the variable was not found. |
||
| 289 |
function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue) |
||
| 290 |
external |
||
| 291 |
view |
||
| 292 |
returns (bytes[] memory value); |
||
| 293 | |||
| 294 |
/// Gets the environment variable `name` and parses it as `int256`. |
||
| 295 |
/// Reverts if the variable could not be parsed. |
||
| 296 |
/// Returns `defaultValue` if the variable was not found. |
||
| 297 |
function envOr(string calldata name, int256 defaultValue) external view returns (int256 value); |
||
| 298 | |||
| 299 |
/// Gets the environment variable `name` and parses it as `address`. |
||
| 300 |
/// Reverts if the variable could not be parsed. |
||
| 301 |
/// Returns `defaultValue` if the variable was not found. |
||
| 302 |
function envOr(string calldata name, address defaultValue) external view returns (address value); |
||
| 303 | |||
| 304 |
/// Gets the environment variable `name` and parses it as `bytes32`. |
||
| 305 |
/// Reverts if the variable could not be parsed. |
||
| 306 |
/// Returns `defaultValue` if the variable was not found. |
||
| 307 |
function envOr(string calldata name, bytes32 defaultValue) external view returns (bytes32 value); |
||
| 308 | |||
| 309 |
/// Gets the environment variable `name` and parses it as `string`. |
||
| 310 |
/// Reverts if the variable could not be parsed. |
||
| 311 |
/// Returns `defaultValue` if the variable was not found. |
||
| 312 |
function envOr(string calldata name, string calldata defaultValue) external view returns (string memory value); |
||
| 313 | |||
| 314 |
/// Gets the environment variable `name` and parses it as `bytes`. |
||
| 315 |
/// Reverts if the variable could not be parsed. |
||
| 316 |
/// Returns `defaultValue` if the variable was not found. |
||
| 317 |
function envOr(string calldata name, bytes calldata defaultValue) external view returns (bytes memory value); |
||
| 318 | |||
| 319 |
/// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`. |
||
| 320 |
/// Reverts if the variable could not be parsed. |
||
| 321 |
/// Returns `defaultValue` if the variable was not found. |
||
| 322 |
function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue) |
||
| 323 |
external |
||
| 324 |
view |
||
| 325 |
returns (bool[] memory value); |
||
| 326 | |||
| 327 |
/// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`. |
||
| 328 |
/// Reverts if the variable could not be parsed. |
||
| 329 |
/// Returns `defaultValue` if the variable was not found. |
||
| 330 |
function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue) |
||
| 331 |
external |
||
| 332 |
view |
||
| 333 |
returns (uint256[] memory value); |
||
| 334 | |||
| 335 |
/// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`. |
||
| 336 |
/// Reverts if the variable could not be parsed. |
||
| 337 |
/// Returns `defaultValue` if the variable was not found. |
||
| 338 |
function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue) |
||
| 339 |
external |
||
| 340 |
view |
||
| 341 |
returns (int256[] memory value); |
||
| 342 | |||
| 343 |
/// Gets the environment variable `name` and parses it as `string`. |
||
| 344 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 345 |
function envString(string calldata name) external view returns (string memory value); |
||
| 346 | |||
| 347 |
/// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`. |
||
| 348 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 349 |
function envString(string calldata name, string calldata delim) external view returns (string[] memory value); |
||
| 350 | |||
| 351 |
/// Gets the environment variable `name` and parses it as `uint256`. |
||
| 352 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 353 |
function envUint(string calldata name) external view returns (uint256 value); |
||
| 354 | |||
| 355 |
/// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`. |
||
| 356 |
/// Reverts if the variable was not found or could not be parsed. |
||
| 357 |
function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value); |
||
| 358 | |||
| 359 |
/// Sets environment variables. |
||
| 360 |
function setEnv(string calldata name, string calldata value) external; |
||
| 361 | |||
| 362 |
// ======== EVM ======== |
||
| 363 | |||
| 364 |
/// Gets all accessed reads and write slot from a `vm.record` session, for a given address. |
||
| 365 |
function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots); |
||
| 366 | |||
| 367 |
/// Gets the address for a given private key. |
||
| 368 |
function addr(uint256 privateKey) external pure returns (address keyAddr); |
||
| 369 | |||
| 370 |
/// Gets all the logs according to specified filter. |
||
| 371 |
function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics) |
||
| 372 |
external |
||
| 373 |
returns (EthGetLogs[] memory logs); |
||
| 374 | |||
| 375 |
/// Gets the current `block.number`. |
||
| 376 |
/// You should use this instead of `block.number` if you use `vm.roll`, as `block.number` is assumed to be constant across a transaction, |
||
| 377 |
/// and as a result will get optimized out by the compiler. |
||
| 378 |
/// See https://github.com/foundry-rs/foundry/issues/6180 |
||
| 379 |
function getBlockNumber() external view returns (uint256 height); |
||
| 380 | |||
| 381 |
/// Gets the current `block.timestamp`. |
||
| 382 |
/// You should use this instead of `block.timestamp` if you use `vm.warp`, as `block.timestamp` is assumed to be constant across a transaction, |
||
| 383 |
/// and as a result will get optimized out by the compiler. |
||
| 384 |
/// See https://github.com/foundry-rs/foundry/issues/6180 |
||
| 385 |
function getBlockTimestamp() external view returns (uint256 timestamp); |
||
| 386 | |||
| 387 |
/// Gets the map key and parent of a mapping at a given slot, for a given address. |
||
| 388 |
function getMappingKeyAndParentOf(address target, bytes32 elementSlot) |
||
| 389 |
external |
||
| 390 |
returns (bool found, bytes32 key, bytes32 parent); |
||
| 391 | |||
| 392 |
/// Gets the number of elements in the mapping at the given slot, for a given address. |
||
| 393 |
function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length); |
||
| 394 | |||
| 395 |
/// Gets the elements at index idx of the mapping at the given slot, for a given address. The |
||
| 396 |
/// index must be less than the length of the mapping (i.e. the number of keys in the mapping). |
||
| 397 |
function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value); |
||
| 398 | |||
| 399 |
/// Gets the nonce of an account. |
||
| 400 |
function getNonce(address account) external view returns (uint64 nonce); |
||
| 401 | |||
| 402 |
/// Gets all the recorded logs. |
||
| 403 |
function getRecordedLogs() external returns (Log[] memory logs); |
||
| 404 | |||
| 405 |
/// Loads a storage slot from an address. |
||
| 406 |
function load(address target, bytes32 slot) external view returns (bytes32 data); |
||
| 407 | |||
| 408 |
/// Pauses gas metering (i.e. gas usage is not counted). Noop if already paused. |
||
| 409 |
function pauseGasMetering() external; |
||
| 410 | |||
| 411 |
/// Records all storage reads and writes. |
||
| 412 |
function record() external; |
||
| 413 | |||
| 414 |
/// Record all the transaction logs. |
||
| 415 |
function recordLogs() external; |
||
| 416 | |||
| 417 |
/// Resumes gas metering (i.e. gas usage is counted again). Noop if already on. |
||
| 418 |
function resumeGasMetering() external; |
||
| 419 | |||
| 420 |
/// Performs an Ethereum JSON-RPC request to the current fork URL. |
||
| 421 |
function rpc(string calldata method, string calldata params) external returns (bytes memory data); |
||
| 422 | |||
| 423 |
/// Signs `digest` with `privateKey` using the secp256r1 curve. |
||
| 424 |
function signP256(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 s); |
||
| 425 | |||
| 426 |
/// Signs `digest` with `privateKey` using the secp256k1 curve. |
||
| 427 |
function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); |
||
| 428 | |||
| 429 |
/// Starts recording all map SSTOREs for later retrieval. |
||
| 430 |
function startMappingRecording() external; |
||
| 431 | |||
| 432 |
/// Record all account accesses as part of CREATE, CALL or SELFDESTRUCT opcodes in order, |
||
| 433 |
/// along with the context of the calls |
||
| 434 |
function startStateDiffRecording() external; |
||
| 435 | |||
| 436 |
/// Returns an ordered array of all account accesses from a `vm.startStateDiffRecording` session. |
||
| 437 |
function stopAndReturnStateDiff() external returns (AccountAccess[] memory accountAccesses); |
||
| 438 | |||
| 439 |
/// Stops recording all map SSTOREs for later retrieval and clears the recorded data. |
||
| 440 |
function stopMappingRecording() external; |
||
| 441 | |||
| 442 |
// ======== Filesystem ======== |
||
| 443 | |||
| 444 |
/// Closes file for reading, resetting the offset and allowing to read it from beginning with readLine. |
||
| 445 |
/// `path` is relative to the project root. |
||
| 446 |
function closeFile(string calldata path) external; |
||
| 447 | |||
| 448 |
/// Copies the contents of one file to another. This function will **overwrite** the contents of `to`. |
||
| 449 |
/// On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`. |
||
| 450 |
/// Both `from` and `to` are relative to the project root. |
||
| 451 |
function copyFile(string calldata from, string calldata to) external returns (uint64 copied); |
||
| 452 | |||
| 453 |
/// Creates a new, empty directory at the provided path. |
||
| 454 |
/// This cheatcode will revert in the following situations, but is not limited to just these cases: |
||
| 455 |
/// - User lacks permissions to modify `path`. |
||
| 456 |
/// - A parent of the given path doesn't exist and `recursive` is false. |
||
| 457 |
/// - `path` already exists and `recursive` is false. |
||
| 458 |
/// `path` is relative to the project root. |
||
| 459 |
function createDir(string calldata path, bool recursive) external; |
||
| 460 | |||
| 461 |
/// Returns true if the given path points to an existing entity, else returns false. |
||
| 462 |
function exists(string calldata path) external returns (bool result); |
||
| 463 | |||
| 464 |
/// Performs a foreign function call via the terminal. |
||
| 465 |
function ffi(string[] calldata commandInput) external returns (bytes memory result); |
||
| 466 | |||
| 467 |
/// Given a path, query the file system to get information about a file, directory, etc. |
||
| 468 |
function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata); |
||
| 469 | |||
| 470 |
/// Gets the creation bytecode from an artifact file. Takes in the relative path to the json file. |
||
| 471 |
function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode); |
||
| 472 | |||
| 473 |
/// Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file. |
||
| 474 |
function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode); |
||
| 475 | |||
| 476 |
/// Returns true if the path exists on disk and is pointing at a directory, else returns false. |
||
| 477 |
function isDir(string calldata path) external returns (bool result); |
||
| 478 | |||
| 479 |
/// Returns true if the path exists on disk and is pointing at a regular file, else returns false. |
||
| 480 |
function isFile(string calldata path) external returns (bool result); |
||
| 481 | |||
| 482 |
/// Get the path of the current project root. |
||
| 483 |
function projectRoot() external view returns (string memory path); |
||
| 484 | |||
| 485 |
/// Reads the directory at the given path recursively, up to `maxDepth`. |
||
| 486 |
/// `maxDepth` defaults to 1, meaning only the direct children of the given directory will be returned. |
||
| 487 |
/// Follows symbolic links if `followLinks` is true. |
||
| 488 |
function readDir(string calldata path) external view returns (DirEntry[] memory entries); |
||
| 489 | |||
| 490 |
/// See `readDir(string)`. |
||
| 491 |
function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries); |
||
| 492 | |||
| 493 |
/// See `readDir(string)`. |
||
| 494 |
function readDir(string calldata path, uint64 maxDepth, bool followLinks) |
||
| 495 |
external |
||
| 496 |
view |
||
| 497 |
returns (DirEntry[] memory entries); |
||
| 498 | |||
| 499 |
/// Reads the entire content of file to string. `path` is relative to the project root. |
||
| 500 |
function readFile(string calldata path) external view returns (string memory data); |
||
| 501 | |||
| 502 |
/// Reads the entire content of file as binary. `path` is relative to the project root. |
||
| 503 |
function readFileBinary(string calldata path) external view returns (bytes memory data); |
||
| 504 | |||
| 505 |
/// Reads next line of file to string. |
||
| 506 |
function readLine(string calldata path) external view returns (string memory line); |
||
| 507 | |||
| 508 |
/// Reads a symbolic link, returning the path that the link points to. |
||
| 509 |
/// This cheatcode will revert in the following situations, but is not limited to just these cases: |
||
| 510 |
/// - `path` is not a symbolic link. |
||
| 511 |
/// - `path` does not exist. |
||
| 512 |
function readLink(string calldata linkPath) external view returns (string memory targetPath); |
||
| 513 | |||
| 514 |
/// Removes a directory at the provided path. |
||
| 515 |
/// This cheatcode will revert in the following situations, but is not limited to just these cases: |
||
| 516 |
/// - `path` doesn't exist. |
||
| 517 |
/// - `path` isn't a directory. |
||
| 518 |
/// - User lacks permissions to modify `path`. |
||
| 519 |
/// - The directory is not empty and `recursive` is false. |
||
| 520 |
/// `path` is relative to the project root. |
||
| 521 |
function removeDir(string calldata path, bool recursive) external; |
||
| 522 | |||
| 523 |
/// Removes a file from the filesystem. |
||
| 524 |
/// This cheatcode will revert in the following situations, but is not limited to just these cases: |
||
| 525 |
/// - `path` points to a directory. |
||
| 526 |
/// - The file doesn't exist. |
||
| 527 |
/// - The user lacks permissions to remove the file. |
||
| 528 |
/// `path` is relative to the project root. |
||
| 529 |
function removeFile(string calldata path) external; |
||
| 530 | |||
| 531 |
/// Performs a foreign function call via terminal and returns the exit code, stdout, and stderr. |
||
| 532 |
function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result); |
||
| 533 | |||
| 534 |
/// Returns the time since unix epoch in milliseconds. |
||
| 535 |
function unixTime() external returns (uint256 milliseconds); |
||
| 536 | |||
| 537 |
/// Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does. |
||
| 538 |
/// `path` is relative to the project root. |
||
| 539 |
function writeFile(string calldata path, string calldata data) external; |
||
| 540 | |||
| 541 |
/// Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does. |
||
| 542 |
/// `path` is relative to the project root. |
||
| 543 |
function writeFileBinary(string calldata path, bytes calldata data) external; |
||
| 544 | |||
| 545 |
/// Writes line to file, creating a file if it does not exist. |
||
| 546 |
/// `path` is relative to the project root. |
||
| 547 |
function writeLine(string calldata path, string calldata data) external; |
||
| 548 | |||
| 549 |
// ======== JSON ======== |
||
| 550 | |||
| 551 |
/// Checks if `key` exists in a JSON object |
||
| 552 |
/// `keyExists` is being deprecated in favor of `keyExistsJson`. It will be removed in future versions. |
||
| 553 |
function keyExists(string calldata json, string calldata key) external view returns (bool); |
||
| 554 | |||
| 555 |
/// Checks if `key` exists in a JSON object. |
||
| 556 |
function keyExistsJson(string calldata json, string calldata key) external view returns (bool); |
||
| 557 | |||
| 558 |
/// Parses a string of JSON data at `key` and coerces it to `address`. |
||
| 559 |
function parseJsonAddress(string calldata json, string calldata key) external pure returns (address); |
||
| 560 | |||
| 561 |
/// Parses a string of JSON data at `key` and coerces it to `address[]`. |
||
| 562 |
function parseJsonAddressArray(string calldata json, string calldata key) |
||
| 563 |
external |
||
| 564 |
pure |
||
| 565 |
returns (address[] memory); |
||
| 566 | |||
| 567 |
/// Parses a string of JSON data at `key` and coerces it to `bool`. |
||
| 568 |
function parseJsonBool(string calldata json, string calldata key) external pure returns (bool); |
||
| 569 | |||
| 570 |
/// Parses a string of JSON data at `key` and coerces it to `bool[]`. |
||
| 571 |
function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory); |
||
| 572 | |||
| 573 |
/// Parses a string of JSON data at `key` and coerces it to `bytes`. |
||
| 574 |
function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory); |
||
| 575 | |||
| 576 |
/// Parses a string of JSON data at `key` and coerces it to `bytes32`. |
||
| 577 |
function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32); |
||
| 578 | |||
| 579 |
/// Parses a string of JSON data at `key` and coerces it to `bytes32[]`. |
||
| 580 |
function parseJsonBytes32Array(string calldata json, string calldata key) |
||
| 581 |
external |
||
| 582 |
pure |
||
| 583 |
returns (bytes32[] memory); |
||
| 584 | |||
| 585 |
/// Parses a string of JSON data at `key` and coerces it to `bytes[]`. |
||
| 586 |
function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory); |
||
| 587 | |||
| 588 |
/// Parses a string of JSON data at `key` and coerces it to `int256`. |
||
| 589 |
function parseJsonInt(string calldata json, string calldata key) external pure returns (int256); |
||
| 590 | |||
| 591 |
/// Parses a string of JSON data at `key` and coerces it to `int256[]`. |
||
| 592 |
function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory); |
||
| 593 | |||
| 594 |
/// Returns an array of all the keys in a JSON object. |
||
| 595 |
function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys); |
||
| 596 | |||
| 597 |
/// Parses a string of JSON data at `key` and coerces it to `string`. |
||
| 598 |
function parseJsonString(string calldata json, string calldata key) external pure returns (string memory); |
||
| 599 | |||
| 600 |
/// Parses a string of JSON data at `key` and coerces it to `string[]`. |
||
| 601 |
function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory); |
||
| 602 | |||
| 603 |
/// Parses a string of JSON data at `key` and coerces it to `uint256`. |
||
| 604 |
function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256); |
||
| 605 | |||
| 606 |
/// Parses a string of JSON data at `key` and coerces it to `uint256[]`. |
||
| 607 |
function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory); |
||
| 608 | |||
| 609 |
/// ABI-encodes a JSON object. |
||
| 610 |
function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData); |
||
| 611 | |||
| 612 |
/// ABI-encodes a JSON object at `key`. |
||
| 613 |
function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData); |
||
| 614 | |||
| 615 |
/// See `serializeJson`. |
||
| 616 |
function serializeAddress(string calldata objectKey, string calldata valueKey, address value) |
||
| 617 |
external |
||
| 618 |
returns (string memory json); |
||
| 619 | |||
| 620 |
/// See `serializeJson`. |
||
| 621 |
function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values) |
||
| 622 |
external |
||
| 623 |
returns (string memory json); |
||
| 624 | |||
| 625 |
/// See `serializeJson`. |
||
| 626 |
function serializeBool(string calldata objectKey, string calldata valueKey, bool value) |
||
| 627 |
external |
||
| 628 |
returns (string memory json); |
||
| 629 | |||
| 630 |
/// See `serializeJson`. |
||
| 631 |
function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values) |
||
| 632 |
external |
||
| 633 |
returns (string memory json); |
||
| 634 | |||
| 635 |
/// See `serializeJson`. |
||
| 636 |
function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value) |
||
| 637 |
external |
||
| 638 |
returns (string memory json); |
||
| 639 | |||
| 640 |
/// See `serializeJson`. |
||
| 641 |
function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values) |
||
| 642 |
external |
||
| 643 |
returns (string memory json); |
||
| 644 | |||
| 645 |
/// See `serializeJson`. |
||
| 646 |
function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value) |
||
| 647 |
external |
||
| 648 |
returns (string memory json); |
||
| 649 | |||
| 650 |
/// See `serializeJson`. |
||
| 651 |
function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values) |
||
| 652 |
external |
||
| 653 |
returns (string memory json); |
||
| 654 | |||
| 655 |
/// See `serializeJson`. |
||
| 656 |
function serializeInt(string calldata objectKey, string calldata valueKey, int256 value) |
||
| 657 |
external |
||
| 658 |
returns (string memory json); |
||
| 659 | |||
| 660 |
/// See `serializeJson`. |
||
| 661 |
function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values) |
||
| 662 |
external |
||
| 663 |
returns (string memory json); |
||
| 664 | |||
| 665 |
/// Serializes a key and value to a JSON object stored in-memory that can be later written to a file. |
||
| 666 |
/// Returns the stringified version of the specific JSON file up to that moment. |
||
| 667 |
function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json); |
||
| 668 | |||
| 669 |
/// See `serializeJson`. |
||
| 670 |
function serializeString(string calldata objectKey, string calldata valueKey, string calldata value) |
||
| 671 |
external |
||
| 672 |
returns (string memory json); |
||
| 673 | |||
| 674 |
/// See `serializeJson`. |
||
| 675 |
function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values) |
||
| 676 |
external |
||
| 677 |
returns (string memory json); |
||
| 678 | |||
| 679 |
/// See `serializeJson`. |
||
| 680 |
function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value) |
||
| 681 |
external |
||
| 682 |
returns (string memory json); |
||
| 683 | |||
| 684 |
/// See `serializeJson`. |
||
| 685 |
function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values) |
||
| 686 |
external |
||
| 687 |
returns (string memory json); |
||
| 688 | |||
| 689 |
/// Write a serialized JSON object to a file. If the file exists, it will be overwritten. |
||
| 690 |
function writeJson(string calldata json, string calldata path) external; |
||
| 691 | |||
| 692 |
/// Write a serialized JSON object to an **existing** JSON file, replacing a value with key = <value_key.> |
||
| 693 |
/// This is useful to replace a specific value of a JSON file, without having to parse the entire thing. |
||
| 694 |
function writeJson(string calldata json, string calldata path, string calldata valueKey) external; |
||
| 695 | |||
| 696 |
// ======== Scripting ======== |
||
| 697 | |||
| 698 |
/// Using the address that calls the test contract, has the next call (at this call depth only) |
||
| 699 |
/// create a transaction that can later be signed and sent onchain. |
||
| 700 |
function broadcast() external; |
||
| 701 | |||
| 702 |
/// Has the next call (at this call depth only) create a transaction with the address provided |
||
| 703 |
/// as the sender that can later be signed and sent onchain. |
||
| 704 |
function broadcast(address signer) external; |
||
| 705 | |||
| 706 |
/// Has the next call (at this call depth only) create a transaction with the private key |
||
| 707 |
/// provided as the sender that can later be signed and sent onchain. |
||
| 708 |
function broadcast(uint256 privateKey) external; |
||
| 709 | |||
| 710 |
/// Using the address that calls the test contract, has all subsequent calls |
||
| 711 |
/// (at this call depth only) create transactions that can later be signed and sent onchain. |
||
| 712 |
function startBroadcast() external; |
||
| 713 | |||
| 714 |
/// Has all subsequent calls (at this call depth only) create transactions with the address |
||
| 715 |
/// provided that can later be signed and sent onchain. |
||
| 716 |
function startBroadcast(address signer) external; |
||
| 717 | |||
| 718 |
/// Has all subsequent calls (at this call depth only) create transactions with the private key |
||
| 719 |
/// provided that can later be signed and sent onchain. |
||
| 720 |
function startBroadcast(uint256 privateKey) external; |
||
| 721 | |||
| 722 |
/// Stops collecting onchain transactions. |
||
| 723 |
function stopBroadcast() external; |
||
| 724 | |||
| 725 |
// ======== String ======== |
||
| 726 | |||
| 727 |
/// Parses the given `string` into an `address`. |
||
| 728 |
function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue); |
||
| 729 | |||
| 730 |
/// Parses the given `string` into a `bool`. |
||
| 731 |
function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue); |
||
| 732 | |||
| 733 |
/// Parses the given `string` into `bytes`. |
||
| 734 |
function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue); |
||
| 735 | |||
| 736 |
/// Parses the given `string` into a `bytes32`. |
||
| 737 |
function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue); |
||
| 738 | |||
| 739 |
/// Parses the given `string` into a `int256`. |
||
| 740 |
function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue); |
||
| 741 | |||
| 742 |
/// Parses the given `string` into a `uint256`. |
||
| 743 |
function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue); |
||
| 744 | |||
| 745 |
/// Replaces occurrences of `from` in the given `string` with `to`. |
||
| 746 |
function replace(string calldata input, string calldata from, string calldata to) |
||
| 747 |
external |
||
| 748 |
pure |
||
| 749 |
returns (string memory output); |
||
| 750 | |||
| 751 |
/// Splits the given `string` into an array of strings divided by the `delimiter`. |
||
| 752 |
function split(string calldata input, string calldata delimiter) external pure returns (string[] memory outputs); |
||
| 753 | |||
| 754 |
/// Converts the given `string` value to Lowercase. |
||
| 755 |
function toLowercase(string calldata input) external pure returns (string memory output); |
||
| 756 | |||
| 757 |
/// Converts the given value to a `string`. |
||
| 758 |
function toString(address value) external pure returns (string memory stringifiedValue); |
||
| 759 | |||
| 760 |
/// Converts the given value to a `string`. |
||
| 761 |
function toString(bytes calldata value) external pure returns (string memory stringifiedValue); |
||
| 762 | |||
| 763 |
/// Converts the given value to a `string`. |
||
| 764 |
function toString(bytes32 value) external pure returns (string memory stringifiedValue); |
||
| 765 | |||
| 766 |
/// Converts the given value to a `string`. |
||
| 767 |
function toString(bool value) external pure returns (string memory stringifiedValue); |
||
| 768 | |||
| 769 |
/// Converts the given value to a `string`. |
||
| 770 |
function toString(uint256 value) external pure returns (string memory stringifiedValue); |
||
| 771 | |||
| 772 |
/// Converts the given value to a `string`. |
||
| 773 |
function toString(int256 value) external pure returns (string memory stringifiedValue); |
||
| 774 | |||
| 775 |
/// Converts the given `string` value to Uppercase. |
||
| 776 |
function toUppercase(string calldata input) external pure returns (string memory output); |
||
| 777 | |||
| 778 |
/// Trims leading and trailing whitespace from the given `string` value. |
||
| 779 |
function trim(string calldata input) external pure returns (string memory output); |
||
| 780 | |||
| 781 |
// ======== Testing ======== |
||
| 782 | |||
| 783 |
/// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. |
||
| 784 |
/// Formats values with decimals in failure message. |
||
| 785 |
function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) external pure; |
||
| 786 | |||
| 787 |
/// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. |
||
| 788 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 789 |
function assertApproxEqAbsDecimal( |
||
| 790 |
uint256 left, |
||
| 791 |
uint256 right, |
||
| 792 |
uint256 maxDelta, |
||
| 793 |
uint256 decimals, |
||
| 794 |
string calldata error |
||
| 795 |
) external pure; |
||
| 796 | |||
| 797 |
/// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. |
||
| 798 |
/// Formats values with decimals in failure message. |
||
| 799 |
function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) external pure; |
||
| 800 | |||
| 801 |
/// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. |
||
| 802 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 803 |
function assertApproxEqAbsDecimal( |
||
| 804 |
int256 left, |
||
| 805 |
int256 right, |
||
| 806 |
uint256 maxDelta, |
||
| 807 |
uint256 decimals, |
||
| 808 |
string calldata error |
||
| 809 |
) external pure; |
||
| 810 | |||
| 811 |
/// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. |
||
| 812 |
function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) external pure; |
||
| 813 | |||
| 814 |
/// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. |
||
| 815 |
/// Includes error message into revert string on failure. |
||
| 816 |
function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string calldata error) external pure; |
||
| 817 | |||
| 818 |
/// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. |
||
| 819 |
function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) external pure; |
||
| 820 | |||
| 821 |
/// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. |
||
| 822 |
/// Includes error message into revert string on failure. |
||
| 823 |
function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string calldata error) external pure; |
||
| 824 | |||
| 825 |
/// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
||
| 826 |
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
||
| 827 |
/// Formats values with decimals in failure message. |
||
| 828 |
function assertApproxEqRelDecimal(uint256 left, uint256 right, uint256 maxPercentDelta, uint256 decimals) |
||
| 829 |
external |
||
| 830 |
pure; |
||
| 831 | |||
| 832 |
/// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
||
| 833 |
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
||
| 834 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 835 |
function assertApproxEqRelDecimal( |
||
| 836 |
uint256 left, |
||
| 837 |
uint256 right, |
||
| 838 |
uint256 maxPercentDelta, |
||
| 839 |
uint256 decimals, |
||
| 840 |
string calldata error |
||
| 841 |
) external pure; |
||
| 842 | |||
| 843 |
/// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
||
| 844 |
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
||
| 845 |
/// Formats values with decimals in failure message. |
||
| 846 |
function assertApproxEqRelDecimal(int256 left, int256 right, uint256 maxPercentDelta, uint256 decimals) |
||
| 847 |
external |
||
| 848 |
pure; |
||
| 849 | |||
| 850 |
/// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
||
| 851 |
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
||
| 852 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 853 |
function assertApproxEqRelDecimal( |
||
| 854 |
int256 left, |
||
| 855 |
int256 right, |
||
| 856 |
uint256 maxPercentDelta, |
||
| 857 |
uint256 decimals, |
||
| 858 |
string calldata error |
||
| 859 |
) external pure; |
||
| 860 | |||
| 861 |
/// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
||
| 862 |
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
||
| 863 |
function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta) external pure; |
||
| 864 | |||
| 865 |
/// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
||
| 866 |
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
||
| 867 |
/// Includes error message into revert string on failure. |
||
| 868 |
function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta, string calldata error) |
||
| 869 |
external |
||
| 870 |
pure; |
||
| 871 | |||
| 872 |
/// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
||
| 873 |
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
||
| 874 |
function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) external pure; |
||
| 875 | |||
| 876 |
/// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
||
| 877 |
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
||
| 878 |
/// Includes error message into revert string on failure. |
||
| 879 |
function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta, string calldata error) |
||
| 880 |
external |
||
| 881 |
pure; |
||
| 882 | |||
| 883 |
/// Asserts that two `uint256` values are equal, formatting them with decimals in failure message. |
||
| 884 |
function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
||
| 885 | |||
| 886 |
/// Asserts that two `uint256` values are equal, formatting them with decimals in failure message. |
||
| 887 |
/// Includes error message into revert string on failure. |
||
| 888 |
function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
||
| 889 | |||
| 890 |
/// Asserts that two `int256` values are equal, formatting them with decimals in failure message. |
||
| 891 |
function assertEqDecimal(int256 left, int256 right, uint256 decimals) external pure; |
||
| 892 | |||
| 893 |
/// Asserts that two `int256` values are equal, formatting them with decimals in failure message. |
||
| 894 |
/// Includes error message into revert string on failure. |
||
| 895 |
function assertEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
||
| 896 | |||
| 897 |
/// Asserts that two `bool` values are equal. |
||
| 898 |
function assertEq(bool left, bool right) external pure; |
||
| 899 | |||
| 900 |
/// Asserts that two `bool` values are equal and includes error message into revert string on failure. |
||
| 901 |
function assertEq(bool left, bool right, string calldata error) external pure; |
||
| 902 | |||
| 903 |
/// Asserts that two `string` values are equal. |
||
| 904 |
function assertEq(string calldata left, string calldata right) external pure; |
||
| 905 | |||
| 906 |
/// Asserts that two `string` values are equal and includes error message into revert string on failure. |
||
| 907 |
function assertEq(string calldata left, string calldata right, string calldata error) external pure; |
||
| 908 | |||
| 909 |
/// Asserts that two `bytes` values are equal. |
||
| 910 |
function assertEq(bytes calldata left, bytes calldata right) external pure; |
||
| 911 | |||
| 912 |
/// Asserts that two `bytes` values are equal and includes error message into revert string on failure. |
||
| 913 |
function assertEq(bytes calldata left, bytes calldata right, string calldata error) external pure; |
||
| 914 | |||
| 915 |
/// Asserts that two arrays of `bool` values are equal. |
||
| 916 |
function assertEq(bool[] calldata left, bool[] calldata right) external pure; |
||
| 917 | |||
| 918 |
/// Asserts that two arrays of `bool` values are equal and includes error message into revert string on failure. |
||
| 919 |
function assertEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure; |
||
| 920 | |||
| 921 |
/// Asserts that two arrays of `uint256 values are equal. |
||
| 922 |
function assertEq(uint256[] calldata left, uint256[] calldata right) external pure; |
||
| 923 | |||
| 924 |
/// Asserts that two arrays of `uint256` values are equal and includes error message into revert string on failure. |
||
| 925 |
function assertEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure; |
||
| 926 | |||
| 927 |
/// Asserts that two arrays of `int256` values are equal. |
||
| 928 |
function assertEq(int256[] calldata left, int256[] calldata right) external pure; |
||
| 929 | |||
| 930 |
/// Asserts that two arrays of `int256` values are equal and includes error message into revert string on failure. |
||
| 931 |
function assertEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure; |
||
| 932 | |||
| 933 |
/// Asserts that two `uint256` values are equal. |
||
| 934 |
function assertEq(uint256 left, uint256 right) external pure; |
||
| 935 | |||
| 936 |
/// Asserts that two arrays of `address` values are equal. |
||
| 937 |
function assertEq(address[] calldata left, address[] calldata right) external pure; |
||
| 938 | |||
| 939 |
/// Asserts that two arrays of `address` values are equal and includes error message into revert string on failure. |
||
| 940 |
function assertEq(address[] calldata left, address[] calldata right, string calldata error) external pure; |
||
| 941 | |||
| 942 |
/// Asserts that two arrays of `bytes32` values are equal. |
||
| 943 |
function assertEq(bytes32[] calldata left, bytes32[] calldata right) external pure; |
||
| 944 | |||
| 945 |
/// Asserts that two arrays of `bytes32` values are equal and includes error message into revert string on failure. |
||
| 946 |
function assertEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure; |
||
| 947 | |||
| 948 |
/// Asserts that two arrays of `string` values are equal. |
||
| 949 |
function assertEq(string[] calldata left, string[] calldata right) external pure; |
||
| 950 | |||
| 951 |
/// Asserts that two arrays of `string` values are equal and includes error message into revert string on failure. |
||
| 952 |
function assertEq(string[] calldata left, string[] calldata right, string calldata error) external pure; |
||
| 953 | |||
| 954 |
/// Asserts that two arrays of `bytes` values are equal. |
||
| 955 |
function assertEq(bytes[] calldata left, bytes[] calldata right) external pure; |
||
| 956 | |||
| 957 |
/// Asserts that two arrays of `bytes` values are equal and includes error message into revert string on failure. |
||
| 958 |
function assertEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure; |
||
| 959 | |||
| 960 |
/// Asserts that two `uint256` values are equal and includes error message into revert string on failure. |
||
| 961 |
function assertEq(uint256 left, uint256 right, string calldata error) external pure; |
||
| 962 | |||
| 963 |
/// Asserts that two `int256` values are equal. |
||
| 964 |
function assertEq(int256 left, int256 right) external pure; |
||
| 965 | |||
| 966 |
/// Asserts that two `int256` values are equal and includes error message into revert string on failure. |
||
| 967 |
function assertEq(int256 left, int256 right, string calldata error) external pure; |
||
| 968 | |||
| 969 |
/// Asserts that two `address` values are equal. |
||
| 970 |
function assertEq(address left, address right) external pure; |
||
| 971 | |||
| 972 |
/// Asserts that two `address` values are equal and includes error message into revert string on failure. |
||
| 973 |
function assertEq(address left, address right, string calldata error) external pure; |
||
| 974 | |||
| 975 |
/// Asserts that two `bytes32` values are equal. |
||
| 976 |
function assertEq(bytes32 left, bytes32 right) external pure; |
||
| 977 | |||
| 978 |
/// Asserts that two `bytes32` values are equal and includes error message into revert string on failure. |
||
| 979 |
function assertEq(bytes32 left, bytes32 right, string calldata error) external pure; |
||
| 980 | |||
| 981 |
/// Asserts that the given condition is false. |
||
| 982 |
function assertFalse(bool condition) external pure; |
||
| 983 | |||
| 984 |
/// Asserts that the given condition is false and includes error message into revert string on failure. |
||
| 985 |
function assertFalse(bool condition, string calldata error) external pure; |
||
| 986 | |||
| 987 |
/// Compares two `uint256` values. Expects first value to be greater than or equal to second. |
||
| 988 |
/// Formats values with decimals in failure message. |
||
| 989 |
function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
||
| 990 | |||
| 991 |
/// Compares two `uint256` values. Expects first value to be greater than or equal to second. |
||
| 992 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 993 |
function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
||
| 994 | |||
| 995 |
/// Compares two `int256` values. Expects first value to be greater than or equal to second. |
||
| 996 |
/// Formats values with decimals in failure message. |
||
| 997 |
function assertGeDecimal(int256 left, int256 right, uint256 decimals) external pure; |
||
| 998 | |||
| 999 |
/// Compares two `int256` values. Expects first value to be greater than or equal to second. |
||
| 1000 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 1001 |
function assertGeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
||
| 1002 | |||
| 1003 |
/// Compares two `uint256` values. Expects first value to be greater than or equal to second. |
||
| 1004 |
function assertGe(uint256 left, uint256 right) external pure; |
||
| 1005 | |||
| 1006 |
/// Compares two `uint256` values. Expects first value to be greater than or equal to second. |
||
| 1007 |
/// Includes error message into revert string on failure. |
||
| 1008 |
function assertGe(uint256 left, uint256 right, string calldata error) external pure; |
||
| 1009 | |||
| 1010 |
/// Compares two `int256` values. Expects first value to be greater than or equal to second. |
||
| 1011 |
function assertGe(int256 left, int256 right) external pure; |
||
| 1012 | |||
| 1013 |
/// Compares two `int256` values. Expects first value to be greater than or equal to second. |
||
| 1014 |
/// Includes error message into revert string on failure. |
||
| 1015 |
function assertGe(int256 left, int256 right, string calldata error) external pure; |
||
| 1016 | |||
| 1017 |
/// Compares two `uint256` values. Expects first value to be greater than second. |
||
| 1018 |
/// Formats values with decimals in failure message. |
||
| 1019 |
function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
||
| 1020 | |||
| 1021 |
/// Compares two `uint256` values. Expects first value to be greater than second. |
||
| 1022 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 1023 |
function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
||
| 1024 | |||
| 1025 |
/// Compares two `int256` values. Expects first value to be greater than second. |
||
| 1026 |
/// Formats values with decimals in failure message. |
||
| 1027 |
function assertGtDecimal(int256 left, int256 right, uint256 decimals) external pure; |
||
| 1028 | |||
| 1029 |
/// Compares two `int256` values. Expects first value to be greater than second. |
||
| 1030 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 1031 |
function assertGtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
||
| 1032 | |||
| 1033 |
/// Compares two `uint256` values. Expects first value to be greater than second. |
||
| 1034 |
function assertGt(uint256 left, uint256 right) external pure; |
||
| 1035 | |||
| 1036 |
/// Compares two `uint256` values. Expects first value to be greater than second. |
||
| 1037 |
/// Includes error message into revert string on failure. |
||
| 1038 |
function assertGt(uint256 left, uint256 right, string calldata error) external pure; |
||
| 1039 | |||
| 1040 |
/// Compares two `int256` values. Expects first value to be greater than second. |
||
| 1041 |
function assertGt(int256 left, int256 right) external pure; |
||
| 1042 | |||
| 1043 |
/// Compares two `int256` values. Expects first value to be greater than second. |
||
| 1044 |
/// Includes error message into revert string on failure. |
||
| 1045 |
function assertGt(int256 left, int256 right, string calldata error) external pure; |
||
| 1046 | |||
| 1047 |
/// Compares two `uint256` values. Expects first value to be less than or equal to second. |
||
| 1048 |
/// Formats values with decimals in failure message. |
||
| 1049 |
function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
||
| 1050 | |||
| 1051 |
/// Compares two `uint256` values. Expects first value to be less than or equal to second. |
||
| 1052 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 1053 |
function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
||
| 1054 | |||
| 1055 |
/// Compares two `int256` values. Expects first value to be less than or equal to second. |
||
| 1056 |
/// Formats values with decimals in failure message. |
||
| 1057 |
function assertLeDecimal(int256 left, int256 right, uint256 decimals) external pure; |
||
| 1058 | |||
| 1059 |
/// Compares two `int256` values. Expects first value to be less than or equal to second. |
||
| 1060 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 1061 |
function assertLeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
||
| 1062 | |||
| 1063 |
/// Compares two `uint256` values. Expects first value to be less than or equal to second. |
||
| 1064 |
function assertLe(uint256 left, uint256 right) external pure; |
||
| 1065 | |||
| 1066 |
/// Compares two `uint256` values. Expects first value to be less than or equal to second. |
||
| 1067 |
/// Includes error message into revert string on failure. |
||
| 1068 |
function assertLe(uint256 left, uint256 right, string calldata error) external pure; |
||
| 1069 | |||
| 1070 |
/// Compares two `int256` values. Expects first value to be less than or equal to second. |
||
| 1071 |
function assertLe(int256 left, int256 right) external pure; |
||
| 1072 | |||
| 1073 |
/// Compares two `int256` values. Expects first value to be less than or equal to second. |
||
| 1074 |
/// Includes error message into revert string on failure. |
||
| 1075 |
function assertLe(int256 left, int256 right, string calldata error) external pure; |
||
| 1076 | |||
| 1077 |
/// Compares two `uint256` values. Expects first value to be less than second. |
||
| 1078 |
/// Formats values with decimals in failure message. |
||
| 1079 |
function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
||
| 1080 | |||
| 1081 |
/// Compares two `uint256` values. Expects first value to be less than second. |
||
| 1082 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 1083 |
function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
||
| 1084 | |||
| 1085 |
/// Compares two `int256` values. Expects first value to be less than second. |
||
| 1086 |
/// Formats values with decimals in failure message. |
||
| 1087 |
function assertLtDecimal(int256 left, int256 right, uint256 decimals) external pure; |
||
| 1088 | |||
| 1089 |
/// Compares two `int256` values. Expects first value to be less than second. |
||
| 1090 |
/// Formats values with decimals in failure message. Includes error message into revert string on failure. |
||
| 1091 |
function assertLtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
||
| 1092 | |||
| 1093 |
/// Compares two `uint256` values. Expects first value to be less than second. |
||
| 1094 |
function assertLt(uint256 left, uint256 right) external pure; |
||
| 1095 | |||
| 1096 |
/// Compares two `uint256` values. Expects first value to be less than second. |
||
| 1097 |
/// Includes error message into revert string on failure. |
||
| 1098 |
function assertLt(uint256 left, uint256 right, string calldata error) external pure; |
||
| 1099 | |||
| 1100 |
/// Compares two `int256` values. Expects first value to be less than second. |
||
| 1101 |
function assertLt(int256 left, int256 right) external pure; |
||
| 1102 | |||
| 1103 |
/// Compares two `int256` values. Expects first value to be less than second. |
||
| 1104 |
/// Includes error message into revert string on failure. |
||
| 1105 |
function assertLt(int256 left, int256 right, string calldata error) external pure; |
||
| 1106 | |||
| 1107 |
/// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message. |
||
| 1108 |
function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
||
| 1109 | |||
| 1110 |
/// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message. |
||
| 1111 |
/// Includes error message into revert string on failure. |
||
| 1112 |
function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
||
| 1113 | |||
| 1114 |
/// Asserts that two `int256` values are not equal, formatting them with decimals in failure message. |
||
| 1115 |
function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) external pure; |
||
| 1116 | |||
| 1117 |
/// Asserts that two `int256` values are not equal, formatting them with decimals in failure message. |
||
| 1118 |
/// Includes error message into revert string on failure. |
||
| 1119 |
function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
||
| 1120 | |||
| 1121 |
/// Asserts that two `bool` values are not equal. |
||
| 1122 |
function assertNotEq(bool left, bool right) external pure; |
||
| 1123 | |||
| 1124 |
/// Asserts that two `bool` values are not equal and includes error message into revert string on failure. |
||
| 1125 |
function assertNotEq(bool left, bool right, string calldata error) external pure; |
||
| 1126 | |||
| 1127 |
/// Asserts that two `string` values are not equal. |
||
| 1128 |
function assertNotEq(string calldata left, string calldata right) external pure; |
||
| 1129 | |||
| 1130 |
/// Asserts that two `string` values are not equal and includes error message into revert string on failure. |
||
| 1131 |
function assertNotEq(string calldata left, string calldata right, string calldata error) external pure; |
||
| 1132 | |||
| 1133 |
/// Asserts that two `bytes` values are not equal. |
||
| 1134 |
function assertNotEq(bytes calldata left, bytes calldata right) external pure; |
||
| 1135 | |||
| 1136 |
/// Asserts that two `bytes` values are not equal and includes error message into revert string on failure. |
||
| 1137 |
function assertNotEq(bytes calldata left, bytes calldata right, string calldata error) external pure; |
||
| 1138 | |||
| 1139 |
/// Asserts that two arrays of `bool` values are not equal. |
||
| 1140 |
function assertNotEq(bool[] calldata left, bool[] calldata right) external pure; |
||
| 1141 | |||
| 1142 |
/// Asserts that two arrays of `bool` values are not equal and includes error message into revert string on failure. |
||
| 1143 |
function assertNotEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure; |
||
| 1144 | |||
| 1145 |
/// Asserts that two arrays of `uint256` values are not equal. |
||
| 1146 |
function assertNotEq(uint256[] calldata left, uint256[] calldata right) external pure; |
||
| 1147 | |||
| 1148 |
/// Asserts that two arrays of `uint256` values are not equal and includes error message into revert string on failure. |
||
| 1149 |
function assertNotEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure; |
||
| 1150 | |||
| 1151 |
/// Asserts that two arrays of `int256` values are not equal. |
||
| 1152 |
function assertNotEq(int256[] calldata left, int256[] calldata right) external pure; |
||
| 1153 | |||
| 1154 |
/// Asserts that two arrays of `int256` values are not equal and includes error message into revert string on failure. |
||
| 1155 |
function assertNotEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure; |
||
| 1156 | |||
| 1157 |
/// Asserts that two `uint256` values are not equal. |
||
| 1158 |
function assertNotEq(uint256 left, uint256 right) external pure; |
||
| 1159 | |||
| 1160 |
/// Asserts that two arrays of `address` values are not equal. |
||
| 1161 |
function assertNotEq(address[] calldata left, address[] calldata right) external pure; |
||
| 1162 | |||
| 1163 |
/// Asserts that two arrays of `address` values are not equal and includes error message into revert string on failure. |
||
| 1164 |
function assertNotEq(address[] calldata left, address[] calldata right, string calldata error) external pure; |
||
| 1165 | |||
| 1166 |
/// Asserts that two arrays of `bytes32` values are not equal. |
||
| 1167 |
function assertNotEq(bytes32[] calldata left, bytes32[] calldata right) external pure; |
||
| 1168 | |||
| 1169 |
/// Asserts that two arrays of `bytes32` values are not equal and includes error message into revert string on failure. |
||
| 1170 |
function assertNotEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure; |
||
| 1171 | |||
| 1172 |
/// Asserts that two arrays of `string` values are not equal. |
||
| 1173 |
function assertNotEq(string[] calldata left, string[] calldata right) external pure; |
||
| 1174 | |||
| 1175 |
/// Asserts that two arrays of `string` values are not equal and includes error message into revert string on failure. |
||
| 1176 |
function assertNotEq(string[] calldata left, string[] calldata right, string calldata error) external pure; |
||
| 1177 | |||
| 1178 |
/// Asserts that two arrays of `bytes` values are not equal. |
||
| 1179 |
function assertNotEq(bytes[] calldata left, bytes[] calldata right) external pure; |
||
| 1180 | |||
| 1181 |
/// Asserts that two arrays of `bytes` values are not equal and includes error message into revert string on failure. |
||
| 1182 |
function assertNotEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure; |
||
| 1183 | |||
| 1184 |
/// Asserts that two `uint256` values are not equal and includes error message into revert string on failure. |
||
| 1185 |
function assertNotEq(uint256 left, uint256 right, string calldata error) external pure; |
||
| 1186 | |||
| 1187 |
/// Asserts that two `int256` values are not equal. |
||
| 1188 |
function assertNotEq(int256 left, int256 right) external pure; |
||
| 1189 | |||
| 1190 |
/// Asserts that two `int256` values are not equal and includes error message into revert string on failure. |
||
| 1191 |
function assertNotEq(int256 left, int256 right, string calldata error) external pure; |
||
| 1192 | |||
| 1193 |
/// Asserts that two `address` values are not equal. |
||
| 1194 |
function assertNotEq(address left, address right) external pure; |
||
| 1195 | |||
| 1196 |
/// Asserts that two `address` values are not equal and includes error message into revert string on failure. |
||
| 1197 |
function assertNotEq(address left, address right, string calldata error) external pure; |
||
| 1198 | |||
| 1199 |
/// Asserts that two `bytes32` values are not equal. |
||
| 1200 |
function assertNotEq(bytes32 left, bytes32 right) external pure; |
||
| 1201 | |||
| 1202 |
/// Asserts that two `bytes32` values are not equal and includes error message into revert string on failure. |
||
| 1203 |
function assertNotEq(bytes32 left, bytes32 right, string calldata error) external pure; |
||
| 1204 | |||
| 1205 |
/// Asserts that the given condition is true. |
||
| 1206 |
function assertTrue(bool condition) external pure; |
||
| 1207 | |||
| 1208 |
/// Asserts that the given condition is true and includes error message into revert string on failure. |
||
| 1209 |
function assertTrue(bool condition, string calldata error) external pure; |
||
| 1210 | |||
| 1211 |
/// If the condition is false, discard this run's fuzz inputs and generate new ones. |
||
| 1212 |
function assume(bool condition) external pure; |
||
| 1213 | |||
| 1214 |
/// Writes a breakpoint to jump to in the debugger. |
||
| 1215 |
function breakpoint(string calldata char) external; |
||
| 1216 | |||
| 1217 |
/// Writes a conditional breakpoint to jump to in the debugger. |
||
| 1218 |
function breakpoint(string calldata char, bool value) external; |
||
| 1219 | |||
| 1220 |
/// Returns the RPC url for the given alias. |
||
| 1221 |
function rpcUrl(string calldata rpcAlias) external view returns (string memory json); |
||
| 1222 | |||
| 1223 |
/// Returns all rpc urls and their aliases as structs. |
||
| 1224 |
function rpcUrlStructs() external view returns (Rpc[] memory urls); |
||
| 1225 | |||
| 1226 |
/// Returns all rpc urls and their aliases `[alias, url][]`. |
||
| 1227 |
function rpcUrls() external view returns (string[2][] memory urls); |
||
| 1228 | |||
| 1229 |
/// Suspends execution of the main thread for `duration` milliseconds. |
||
| 1230 |
function sleep(uint256 duration) external; |
||
| 1231 | |||
| 1232 |
// ======== Toml ======== |
||
| 1233 | |||
| 1234 |
/// Checks if `key` exists in a TOML table. |
||
| 1235 |
function keyExistsToml(string calldata toml, string calldata key) external view returns (bool); |
||
| 1236 | |||
| 1237 |
/// Parses a string of TOML data at `key` and coerces it to `address`. |
||
| 1238 |
function parseTomlAddress(string calldata toml, string calldata key) external pure returns (address); |
||
| 1239 | |||
| 1240 |
/// Parses a string of TOML data at `key` and coerces it to `address[]`. |
||
| 1241 |
function parseTomlAddressArray(string calldata toml, string calldata key) |
||
| 1242 |
external |
||
| 1243 |
pure |
||
| 1244 |
returns (address[] memory); |
||
| 1245 | |||
| 1246 |
/// Parses a string of TOML data at `key` and coerces it to `bool`. |
||
| 1247 |
function parseTomlBool(string calldata toml, string calldata key) external pure returns (bool); |
||
| 1248 | |||
| 1249 |
/// Parses a string of TOML data at `key` and coerces it to `bool[]`. |
||
| 1250 |
function parseTomlBoolArray(string calldata toml, string calldata key) external pure returns (bool[] memory); |
||
| 1251 | |||
| 1252 |
/// Parses a string of TOML data at `key` and coerces it to `bytes`. |
||
| 1253 |
function parseTomlBytes(string calldata toml, string calldata key) external pure returns (bytes memory); |
||
| 1254 | |||
| 1255 |
/// Parses a string of TOML data at `key` and coerces it to `bytes32`. |
||
| 1256 |
function parseTomlBytes32(string calldata toml, string calldata key) external pure returns (bytes32); |
||
| 1257 | |||
| 1258 |
/// Parses a string of TOML data at `key` and coerces it to `bytes32[]`. |
||
| 1259 |
function parseTomlBytes32Array(string calldata toml, string calldata key) |
||
| 1260 |
external |
||
| 1261 |
pure |
||
| 1262 |
returns (bytes32[] memory); |
||
| 1263 | |||
| 1264 |
/// Parses a string of TOML data at `key` and coerces it to `bytes[]`. |
||
| 1265 |
function parseTomlBytesArray(string calldata toml, string calldata key) external pure returns (bytes[] memory); |
||
| 1266 | |||
| 1267 |
/// Parses a string of TOML data at `key` and coerces it to `int256`. |
||
| 1268 |
function parseTomlInt(string calldata toml, string calldata key) external pure returns (int256); |
||
| 1269 | |||
| 1270 |
/// Parses a string of TOML data at `key` and coerces it to `int256[]`. |
||
| 1271 |
function parseTomlIntArray(string calldata toml, string calldata key) external pure returns (int256[] memory); |
||
| 1272 | |||
| 1273 |
/// Returns an array of all the keys in a TOML table. |
||
| 1274 |
function parseTomlKeys(string calldata toml, string calldata key) external pure returns (string[] memory keys); |
||
| 1275 | |||
| 1276 |
/// Parses a string of TOML data at `key` and coerces it to `string`. |
||
| 1277 |
function parseTomlString(string calldata toml, string calldata key) external pure returns (string memory); |
||
| 1278 | |||
| 1279 |
/// Parses a string of TOML data at `key` and coerces it to `string[]`. |
||
| 1280 |
function parseTomlStringArray(string calldata toml, string calldata key) external pure returns (string[] memory); |
||
| 1281 | |||
| 1282 |
/// Parses a string of TOML data at `key` and coerces it to `uint256`. |
||
| 1283 |
function parseTomlUint(string calldata toml, string calldata key) external pure returns (uint256); |
||
| 1284 | |||
| 1285 |
/// Parses a string of TOML data at `key` and coerces it to `uint256[]`. |
||
| 1286 |
function parseTomlUintArray(string calldata toml, string calldata key) external pure returns (uint256[] memory); |
||
| 1287 | |||
| 1288 |
/// ABI-encodes a TOML table. |
||
| 1289 |
function parseToml(string calldata toml) external pure returns (bytes memory abiEncodedData); |
||
| 1290 | |||
| 1291 |
/// ABI-encodes a TOML table at `key`. |
||
| 1292 |
function parseToml(string calldata toml, string calldata key) external pure returns (bytes memory abiEncodedData); |
||
| 1293 | |||
| 1294 |
/// Takes serialized JSON, converts to TOML and write a serialized TOML to a file. |
||
| 1295 |
function writeToml(string calldata json, string calldata path) external; |
||
| 1296 | |||
| 1297 |
/// Takes serialized JSON, converts to TOML and write a serialized TOML table to an **existing** TOML file, replacing a value with key = <value_key.> |
||
| 1298 |
/// This is useful to replace a specific value of a TOML file, without having to parse the entire thing. |
||
| 1299 |
function writeToml(string calldata json, string calldata path, string calldata valueKey) external; |
||
| 1300 | |||
| 1301 |
// ======== Utilities ======== |
||
| 1302 | |||
| 1303 |
/// Compute the address of a contract created with CREATE2 using the given CREATE2 deployer. |
||
| 1304 |
function computeCreate2Address(bytes32 salt, bytes32 initCodeHash, address deployer) |
||
| 1305 |
external |
||
| 1306 |
pure |
||
| 1307 |
returns (address); |
||
| 1308 | |||
| 1309 |
/// Compute the address of a contract created with CREATE2 using the default CREATE2 deployer. |
||
| 1310 |
function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) external pure returns (address); |
||
| 1311 | |||
| 1312 |
/// Compute the address a contract will be deployed at for a given deployer address and nonce. |
||
| 1313 |
function computeCreateAddress(address deployer, uint256 nonce) external pure returns (address); |
||
| 1314 | |||
| 1315 |
/// Derives a private key from the name, labels the account with that name, and returns the wallet. |
||
| 1316 |
function createWallet(string calldata walletLabel) external returns (Wallet memory wallet); |
||
| 1317 | |||
| 1318 |
/// Generates a wallet from the private key and returns the wallet. |
||
| 1319 |
function createWallet(uint256 privateKey) external returns (Wallet memory wallet); |
||
| 1320 | |||
| 1321 |
/// Generates a wallet from the private key, labels the account with that name, and returns the wallet. |
||
| 1322 |
function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet); |
||
| 1323 | |||
| 1324 |
/// Derive a private key from a provided mnenomic string (or mnenomic file path) |
||
| 1325 |
/// at the derivation path `m/44'/60'/0'/0/{index}`.
|
||
| 1326 |
function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey); |
||
| 1327 | |||
| 1328 |
/// Derive a private key from a provided mnenomic string (or mnenomic file path) |
||
| 1329 |
/// at `{derivationPath}{index}`.
|
||
| 1330 |
function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index) |
||
| 1331 |
external |
||
| 1332 |
pure |
||
| 1333 |
returns (uint256 privateKey); |
||
| 1334 | |||
| 1335 |
/// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language |
||
| 1336 |
/// at the derivation path `m/44'/60'/0'/0/{index}`.
|
||
| 1337 |
function deriveKey(string calldata mnemonic, uint32 index, string calldata language) |
||
| 1338 |
external |
||
| 1339 |
pure |
||
| 1340 |
returns (uint256 privateKey); |
||
| 1341 | |||
| 1342 |
/// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language |
||
| 1343 |
/// at `{derivationPath}{index}`.
|
||
| 1344 |
function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index, string calldata language) |
||
| 1345 |
external |
||
| 1346 |
pure |
||
| 1347 |
returns (uint256 privateKey); |
||
| 1348 | |||
| 1349 |
/// Gets the label for the specified address. |
||
| 1350 |
function getLabel(address account) external view returns (string memory currentLabel); |
||
| 1351 | |||
| 1352 |
/// Get a `Wallet`'s nonce. |
||
| 1353 |
function getNonce(Wallet calldata wallet) external returns (uint64 nonce); |
||
| 1354 | |||
| 1355 |
/// Labels an address in call traces. |
||
| 1356 |
function label(address account, string calldata newLabel) external; |
||
| 1357 | |||
| 1358 |
/// Adds a private key to the local forge wallet and returns the address. |
||
| 1359 |
function rememberKey(uint256 privateKey) external returns (address keyAddr); |
||
| 1360 | |||
| 1361 |
/// Signs data with a `Wallet`. |
||
| 1362 |
function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s); |
||
| 1363 | |||
| 1364 |
/// Encodes a `bytes` value to a base64url string. |
||
| 1365 |
function toBase64URL(bytes calldata data) external pure returns (string memory); |
||
| 1366 | |||
| 1367 |
/// Encodes a `string` value to a base64url string. |
||
| 1368 |
function toBase64URL(string calldata data) external pure returns (string memory); |
||
| 1369 | |||
| 1370 |
/// Encodes a `bytes` value to a base64 string. |
||
| 1371 |
function toBase64(bytes calldata data) external pure returns (string memory); |
||
| 1372 | |||
| 1373 |
/// Encodes a `string` value to a base64 string. |
||
| 1374 |
function toBase64(string calldata data) external pure returns (string memory); |
||
| 1375 |
} |
||
| 1376 | |||
| 1377 |
/// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used |
||
| 1378 |
/// in tests, but it is not recommended to use these cheats in scripts. |
||
| 1379 |
interface Vm is VmSafe {
|
||
| 1380 |
// ======== EVM ======== |
||
| 1381 | |||
| 1382 |
/// Returns the identifier of the currently active fork. Reverts if no fork is currently active. |
||
| 1383 |
function activeFork() external view returns (uint256 forkId); |
||
| 1384 | |||
| 1385 |
/// In forking mode, explicitly grant the given address cheatcode access. |
||
| 1386 |
function allowCheatcodes(address account) external; |
||
| 1387 | |||
| 1388 |
/// Sets `block.chainid`. |
||
| 1389 |
function chainId(uint256 newChainId) external; |
||
| 1390 | |||
| 1391 |
/// Clears all mocked calls. |
||
| 1392 |
function clearMockedCalls() external; |
||
| 1393 | |||
| 1394 |
/// Sets `block.coinbase`. |
||
| 1395 |
function coinbase(address newCoinbase) external; |
||
| 1396 | |||
| 1397 |
/// Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork. |
||
| 1398 |
function createFork(string calldata urlOrAlias) external returns (uint256 forkId); |
||
| 1399 | |||
| 1400 |
/// Creates a new fork with the given endpoint and block and returns the identifier of the fork. |
||
| 1401 |
function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId); |
||
| 1402 | |||
| 1403 |
/// Creates a new fork with the given endpoint and at the block the given transaction was mined in, |
||
| 1404 |
/// replays all transaction mined in the block before the transaction, and returns the identifier of the fork. |
||
| 1405 |
function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId); |
||
| 1406 | |||
| 1407 |
/// Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork. |
||
| 1408 |
function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId); |
||
| 1409 | |||
| 1410 |
/// Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork. |
||
| 1411 |
function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId); |
||
| 1412 | |||
| 1413 |
/// Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, |
||
| 1414 |
/// replays all transaction mined in the block before the transaction, returns the identifier of the fork. |
||
| 1415 |
function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId); |
||
| 1416 | |||
| 1417 |
/// Sets an address' balance. |
||
| 1418 |
function deal(address account, uint256 newBalance) external; |
||
| 1419 | |||
| 1420 |
/// Removes the snapshot with the given ID created by `snapshot`. |
||
| 1421 |
/// Takes the snapshot ID to delete. |
||
| 1422 |
/// Returns `true` if the snapshot was successfully deleted. |
||
| 1423 |
/// Returns `false` if the snapshot does not exist. |
||
| 1424 |
function deleteSnapshot(uint256 snapshotId) external returns (bool success); |
||
| 1425 | |||
| 1426 |
/// Removes _all_ snapshots previously created by `snapshot`. |
||
| 1427 |
function deleteSnapshots() external; |
||
| 1428 | |||
| 1429 |
/// Sets `block.difficulty`. |
||
| 1430 |
/// Not available on EVM versions from Paris onwards. Use `prevrandao` instead. |
||
| 1431 |
/// Reverts if used on unsupported EVM versions. |
||
| 1432 |
function difficulty(uint256 newDifficulty) external; |
||
| 1433 | |||
| 1434 |
/// Dump a genesis JSON file's `allocs` to disk. |
||
| 1435 |
function dumpState(string calldata pathToStateJson) external; |
||
| 1436 | |||
| 1437 |
/// Sets an address' code. |
||
| 1438 |
function etch(address target, bytes calldata newRuntimeBytecode) external; |
||
| 1439 | |||
| 1440 |
/// Sets `block.basefee`. |
||
| 1441 |
function fee(uint256 newBasefee) external; |
||
| 1442 | |||
| 1443 |
/// Returns true if the account is marked as persistent. |
||
| 1444 |
function isPersistent(address account) external view returns (bool persistent); |
||
| 1445 | |||
| 1446 |
/// Load a genesis JSON file's `allocs` into the in-memory revm state. |
||
| 1447 |
function loadAllocs(string calldata pathToAllocsJson) external; |
||
| 1448 | |||
| 1449 |
/// Marks that the account(s) should use persistent storage across fork swaps in a multifork setup |
||
| 1450 |
/// Meaning, changes made to the state of this account will be kept when switching forks. |
||
| 1451 |
function makePersistent(address account) external; |
||
| 1452 | |||
| 1453 |
/// See `makePersistent(address)`. |
||
| 1454 |
function makePersistent(address account0, address account1) external; |
||
| 1455 | |||
| 1456 |
/// See `makePersistent(address)`. |
||
| 1457 |
function makePersistent(address account0, address account1, address account2) external; |
||
| 1458 | |||
| 1459 |
/// See `makePersistent(address)`. |
||
| 1460 |
function makePersistent(address[] calldata accounts) external; |
||
| 1461 | |||
| 1462 |
/// Reverts a call to an address with specified revert data. |
||
| 1463 |
function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external; |
||
| 1464 | |||
| 1465 |
/// Reverts a call to an address with a specific `msg.value`, with specified revert data. |
||
| 1466 |
function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData) |
||
| 1467 |
external; |
||
| 1468 | |||
| 1469 |
/// Mocks a call to an address, returning specified data. |
||
| 1470 |
/// Calldata can either be strict or a partial match, e.g. if you only |
||
| 1471 |
/// pass a Solidity selector to the expected calldata, then the entire Solidity |
||
| 1472 |
/// function will be mocked. |
||
| 1473 |
function mockCall(address callee, bytes calldata data, bytes calldata returnData) external; |
||
| 1474 | |||
| 1475 |
/// Mocks a call to an address with a specific `msg.value`, returning specified data. |
||
| 1476 |
/// Calldata match takes precedence over `msg.value` in case of ambiguity. |
||
| 1477 |
function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external; |
||
| 1478 | |||
| 1479 |
/// Sets the *next* call's `msg.sender` to be the input address. |
||
| 1480 |
function prank(address msgSender) external; |
||
| 1481 | |||
| 1482 |
/// Sets the *next* call's `msg.sender` to be the input address, and the `tx.origin` to be the second input. |
||
| 1483 |
function prank(address msgSender, address txOrigin) external; |
||
| 1484 | |||
| 1485 |
/// Sets `block.prevrandao`. |
||
| 1486 |
/// Not available on EVM versions before Paris. Use `difficulty` instead. |
||
| 1487 |
/// If used on unsupported EVM versions it will revert. |
||
| 1488 |
function prevrandao(bytes32 newPrevrandao) external; |
||
| 1489 | |||
| 1490 |
/// Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification. |
||
| 1491 |
function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin); |
||
| 1492 | |||
| 1493 |
/// Resets the nonce of an account to 0 for EOAs and 1 for contract accounts. |
||
| 1494 |
function resetNonce(address account) external; |
||
| 1495 | |||
| 1496 |
/// Revert the state of the EVM to a previous snapshot |
||
| 1497 |
/// Takes the snapshot ID to revert to. |
||
| 1498 |
/// Returns `true` if the snapshot was successfully reverted. |
||
| 1499 |
/// Returns `false` if the snapshot does not exist. |
||
| 1500 |
/// **Note:** This does not automatically delete the snapshot. To delete the snapshot use `deleteSnapshot`. |
||
| 1501 |
function revertTo(uint256 snapshotId) external returns (bool success); |
||
| 1502 | |||
| 1503 |
/// Revert the state of the EVM to a previous snapshot and automatically deletes the snapshots |
||
| 1504 |
/// Takes the snapshot ID to revert to. |
||
| 1505 |
/// Returns `true` if the snapshot was successfully reverted and deleted. |
||
| 1506 |
/// Returns `false` if the snapshot does not exist. |
||
| 1507 |
function revertToAndDelete(uint256 snapshotId) external returns (bool success); |
||
| 1508 | |||
| 1509 |
/// Revokes persistent status from the address, previously added via `makePersistent`. |
||
| 1510 |
function revokePersistent(address account) external; |
||
| 1511 | |||
| 1512 |
/// See `revokePersistent(address)`. |
||
| 1513 |
function revokePersistent(address[] calldata accounts) external; |
||
| 1514 | |||
| 1515 |
/// Sets `block.height`. |
||
| 1516 |
function roll(uint256 newHeight) external; |
||
| 1517 | |||
| 1518 |
/// Updates the currently active fork to given block number |
||
| 1519 |
/// This is similar to `roll` but for the currently active fork. |
||
| 1520 |
function rollFork(uint256 blockNumber) external; |
||
| 1521 | |||
| 1522 |
/// Updates the currently active fork to given transaction. This will `rollFork` with the number |
||
| 1523 |
/// of the block the transaction was mined in and replays all transaction mined before it in the block. |
||
| 1524 |
function rollFork(bytes32 txHash) external; |
||
| 1525 | |||
| 1526 |
/// Updates the given fork to given block number. |
||
| 1527 |
function rollFork(uint256 forkId, uint256 blockNumber) external; |
||
| 1528 | |||
| 1529 |
/// Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block. |
||
| 1530 |
function rollFork(uint256 forkId, bytes32 txHash) external; |
||
| 1531 | |||
| 1532 |
/// Takes a fork identifier created by `createFork` and sets the corresponding forked state as active. |
||
| 1533 |
function selectFork(uint256 forkId) external; |
||
| 1534 | |||
| 1535 |
/// Sets the nonce of an account. Must be higher than the current nonce of the account. |
||
| 1536 |
function setNonce(address account, uint64 newNonce) external; |
||
| 1537 | |||
| 1538 |
/// Sets the nonce of an account to an arbitrary value. |
||
| 1539 |
function setNonceUnsafe(address account, uint64 newNonce) external; |
||
| 1540 | |||
| 1541 |
/// Snapshot the current state of the evm. |
||
| 1542 |
/// Returns the ID of the snapshot that was created. |
||
| 1543 |
/// To revert a snapshot use `revertTo`. |
||
| 1544 |
function snapshot() external returns (uint256 snapshotId); |
||
| 1545 | |||
| 1546 |
/// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called. |
||
| 1547 |
function startPrank(address msgSender) external; |
||
| 1548 | |||
| 1549 |
/// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input. |
||
| 1550 |
function startPrank(address msgSender, address txOrigin) external; |
||
| 1551 | |||
| 1552 |
/// Resets subsequent calls' `msg.sender` to be `address(this)`. |
||
| 1553 |
function stopPrank() external; |
||
| 1554 | |||
| 1555 |
/// Stores a value to an address' storage slot. |
||
| 1556 |
function store(address target, bytes32 slot, bytes32 value) external; |
||
| 1557 | |||
| 1558 |
/// Fetches the given transaction from the active fork and executes it on the current state. |
||
| 1559 |
function transact(bytes32 txHash) external; |
||
| 1560 | |||
| 1561 |
/// Fetches the given transaction from the given fork and executes it on the current state. |
||
| 1562 |
function transact(uint256 forkId, bytes32 txHash) external; |
||
| 1563 | |||
| 1564 |
/// Sets `tx.gasprice`. |
||
| 1565 |
function txGasPrice(uint256 newGasPrice) external; |
||
| 1566 | |||
| 1567 |
/// Sets `block.timestamp`. |
||
| 1568 |
function warp(uint256 newTimestamp) external; |
||
| 1569 | |||
| 1570 |
// ======== Testing ======== |
||
| 1571 | |||
| 1572 |
/// Expect a call to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas. |
||
| 1573 |
function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external; |
||
| 1574 | |||
| 1575 |
/// Expect given number of calls to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas. |
||
| 1576 |
function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count) |
||
| 1577 |
external; |
||
| 1578 | |||
| 1579 |
/// Expects a call to an address with the specified calldata. |
||
| 1580 |
/// Calldata can either be a strict or a partial match. |
||
| 1581 |
function expectCall(address callee, bytes calldata data) external; |
||
| 1582 | |||
| 1583 |
/// Expects given number of calls to an address with the specified calldata. |
||
| 1584 |
function expectCall(address callee, bytes calldata data, uint64 count) external; |
||
| 1585 | |||
| 1586 |
/// Expects a call to an address with the specified `msg.value` and calldata. |
||
| 1587 |
function expectCall(address callee, uint256 msgValue, bytes calldata data) external; |
||
| 1588 | |||
| 1589 |
/// Expects given number of calls to an address with the specified `msg.value` and calldata. |
||
| 1590 |
function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external; |
||
| 1591 | |||
| 1592 |
/// Expect a call to an address with the specified `msg.value`, gas, and calldata. |
||
| 1593 |
function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external; |
||
| 1594 | |||
| 1595 |
/// Expects given number of calls to an address with the specified `msg.value`, gas, and calldata. |
||
| 1596 |
function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external; |
||
| 1597 | |||
| 1598 |
/// Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.). |
||
| 1599 |
/// Call this function, then emit an event, then call a function. Internally after the call, we check if |
||
| 1600 |
/// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). |
||
| 1601 |
function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external; |
||
| 1602 | |||
| 1603 |
/// Same as the previous method, but also checks supplied address against emitting contract. |
||
| 1604 |
function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter) |
||
| 1605 |
external; |
||
| 1606 | |||
| 1607 |
/// Prepare an expected log with all topic and data checks enabled. |
||
| 1608 |
/// Call this function, then emit an event, then call a function. Internally after the call, we check if |
||
| 1609 |
/// logs were emitted in the expected order with the expected topics and data. |
||
| 1610 |
function expectEmit() external; |
||
| 1611 | |||
| 1612 |
/// Same as the previous method, but also checks supplied address against emitting contract. |
||
| 1613 |
function expectEmit(address emitter) external; |
||
| 1614 | |||
| 1615 |
/// Expects an error on next call with any revert data. |
||
| 1616 |
function expectRevert() external; |
||
| 1617 | |||
| 1618 |
/// Expects an error on next call that starts with the revert data. |
||
| 1619 |
function expectRevert(bytes4 revertData) external; |
||
| 1620 | |||
| 1621 |
/// Expects an error on next call that exactly matches the revert data. |
||
| 1622 |
function expectRevert(bytes calldata revertData) external; |
||
| 1623 | |||
| 1624 |
/// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other |
||
| 1625 |
/// memory is written to, the test will fail. Can be called multiple times to add more ranges to the set. |
||
| 1626 |
function expectSafeMemory(uint64 min, uint64 max) external; |
||
| 1627 | |||
| 1628 |
/// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext. |
||
| 1629 |
/// If any other memory is written to, the test will fail. Can be called multiple times to add more ranges |
||
| 1630 |
/// to the set. |
||
| 1631 |
function expectSafeMemoryCall(uint64 min, uint64 max) external; |
||
| 1632 | |||
| 1633 |
/// Marks a test as skipped. Must be called at the top of the test. |
||
| 1634 |
function skip(bool skipTest) external; |
||
| 1635 | |||
| 1636 |
/// Stops all safe memory expectation in the current subcontext. |
||
| 1637 |
function stopExpectSafeMemory() external; |
||
| 1638 |
} |
||
| 1639 |
| Lines covered: | 0 / 6 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.4.22 <0.9.0; |
||
| 3 | |||
| 4 |
library console {
|
||
| 5 |
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); |
||
| 6 | |||
| 7 |
function _sendLogPayload(bytes memory payload) private view {
|
||
| 8 |
uint256 payloadLength = payload.length; |
||
| 9 |
address consoleAddress = CONSOLE_ADDRESS; |
||
| 10 |
/// @solidity memory-safe-assembly |
||
| 11 |
assembly {
|
||
| 12 |
let payloadStart := add(payload, 32) |
||
| 13 |
let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) |
||
| 14 |
} |
||
| 15 |
} |
||
| 16 | |||
| 17 |
function log() internal view {
|
||
| 18 |
_sendLogPayload(abi.encodeWithSignature("log()"));
|
||
| 19 |
} |
||
| 20 | |||
| 21 |
function logInt(int p0) internal view {
|
||
| 22 |
_sendLogPayload(abi.encodeWithSignature("log(int)", p0));
|
||
| 23 |
} |
||
| 24 | |||
| 25 |
function logUint(uint p0) internal view {
|
||
| 26 |
_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
|
||
| 27 |
} |
||
| 28 | |||
| 29 |
function logString(string memory p0) internal view {
|
||
| 30 |
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
|
||
| 31 |
} |
||
| 32 | |||
| 33 |
function logBool(bool p0) internal view {
|
||
| 34 |
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
|
||
| 35 |
} |
||
| 36 | |||
| 37 |
function logAddress(address p0) internal view {
|
||
| 38 |
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
|
||
| 39 |
} |
||
| 40 | |||
| 41 |
function logBytes(bytes memory p0) internal view {
|
||
| 42 |
_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
|
||
| 43 |
} |
||
| 44 | |||
| 45 |
function logBytes1(bytes1 p0) internal view {
|
||
| 46 |
_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
|
||
| 47 |
} |
||
| 48 | |||
| 49 |
function logBytes2(bytes2 p0) internal view {
|
||
| 50 |
_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
|
||
| 51 |
} |
||
| 52 | |||
| 53 |
function logBytes3(bytes3 p0) internal view {
|
||
| 54 |
_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
|
||
| 55 |
} |
||
| 56 | |||
| 57 |
function logBytes4(bytes4 p0) internal view {
|
||
| 58 |
_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
|
||
| 59 |
} |
||
| 60 | |||
| 61 |
function logBytes5(bytes5 p0) internal view {
|
||
| 62 |
_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
|
||
| 63 |
} |
||
| 64 | |||
| 65 |
function logBytes6(bytes6 p0) internal view {
|
||
| 66 |
_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
|
||
| 67 |
} |
||
| 68 | |||
| 69 |
function logBytes7(bytes7 p0) internal view {
|
||
| 70 |
_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
|
||
| 71 |
} |
||
| 72 | |||
| 73 |
function logBytes8(bytes8 p0) internal view {
|
||
| 74 |
_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
|
||
| 75 |
} |
||
| 76 | |||
| 77 |
function logBytes9(bytes9 p0) internal view {
|
||
| 78 |
_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
|
||
| 79 |
} |
||
| 80 | |||
| 81 |
function logBytes10(bytes10 p0) internal view {
|
||
| 82 |
_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
|
||
| 83 |
} |
||
| 84 | |||
| 85 |
function logBytes11(bytes11 p0) internal view {
|
||
| 86 |
_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
|
||
| 87 |
} |
||
| 88 | |||
| 89 |
function logBytes12(bytes12 p0) internal view {
|
||
| 90 |
_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
|
||
| 91 |
} |
||
| 92 | |||
| 93 |
function logBytes13(bytes13 p0) internal view {
|
||
| 94 |
_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
|
||
| 95 |
} |
||
| 96 | |||
| 97 |
function logBytes14(bytes14 p0) internal view {
|
||
| 98 |
_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
|
||
| 99 |
} |
||
| 100 | |||
| 101 |
function logBytes15(bytes15 p0) internal view {
|
||
| 102 |
_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
|
||
| 103 |
} |
||
| 104 | |||
| 105 |
function logBytes16(bytes16 p0) internal view {
|
||
| 106 |
_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
|
||
| 107 |
} |
||
| 108 | |||
| 109 |
function logBytes17(bytes17 p0) internal view {
|
||
| 110 |
_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
|
||
| 111 |
} |
||
| 112 | |||
| 113 |
function logBytes18(bytes18 p0) internal view {
|
||
| 114 |
_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
|
||
| 115 |
} |
||
| 116 | |||
| 117 |
function logBytes19(bytes19 p0) internal view {
|
||
| 118 |
_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
|
||
| 119 |
} |
||
| 120 | |||
| 121 |
function logBytes20(bytes20 p0) internal view {
|
||
| 122 |
_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
|
||
| 123 |
} |
||
| 124 | |||
| 125 |
function logBytes21(bytes21 p0) internal view {
|
||
| 126 |
_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
|
||
| 127 |
} |
||
| 128 | |||
| 129 |
function logBytes22(bytes22 p0) internal view {
|
||
| 130 |
_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
|
||
| 131 |
} |
||
| 132 | |||
| 133 |
function logBytes23(bytes23 p0) internal view {
|
||
| 134 |
_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
|
||
| 135 |
} |
||
| 136 | |||
| 137 |
function logBytes24(bytes24 p0) internal view {
|
||
| 138 |
_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
|
||
| 139 |
} |
||
| 140 | |||
| 141 |
function logBytes25(bytes25 p0) internal view {
|
||
| 142 |
_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
|
||
| 143 |
} |
||
| 144 | |||
| 145 |
function logBytes26(bytes26 p0) internal view {
|
||
| 146 |
_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
|
||
| 147 |
} |
||
| 148 | |||
| 149 |
function logBytes27(bytes27 p0) internal view {
|
||
| 150 |
_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
|
||
| 151 |
} |
||
| 152 | |||
| 153 |
function logBytes28(bytes28 p0) internal view {
|
||
| 154 |
_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
|
||
| 155 |
} |
||
| 156 | |||
| 157 |
function logBytes29(bytes29 p0) internal view {
|
||
| 158 |
_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
|
||
| 159 |
} |
||
| 160 | |||
| 161 |
function logBytes30(bytes30 p0) internal view {
|
||
| 162 |
_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
|
||
| 163 |
} |
||
| 164 | |||
| 165 |
function logBytes31(bytes31 p0) internal view {
|
||
| 166 |
_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
|
||
| 167 |
} |
||
| 168 | |||
| 169 |
function logBytes32(bytes32 p0) internal view {
|
||
| 170 |
_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
|
||
| 171 |
} |
||
| 172 | |||
| 173 |
function log(uint p0) internal view {
|
||
| 174 |
_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
|
||
| 175 |
} |
||
| 176 | |||
| 177 |
function log(string memory p0) internal view {
|
||
| 178 |
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
|
||
| 179 |
} |
||
| 180 | |||
| 181 |
function log(bool p0) internal view {
|
||
| 182 |
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
|
||
| 183 |
} |
||
| 184 | |||
| 185 |
function log(address p0) internal view {
|
||
| 186 |
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
|
||
| 187 |
} |
||
| 188 | |||
| 189 |
function log(uint p0, uint p1) internal view {
|
||
| 190 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1));
|
||
| 191 |
} |
||
| 192 | |||
| 193 |
function log(uint p0, string memory p1) internal view {
|
||
| 194 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1));
|
||
| 195 |
} |
||
| 196 | |||
| 197 |
function log(uint p0, bool p1) internal view {
|
||
| 198 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1));
|
||
| 199 |
} |
||
| 200 | |||
| 201 |
function log(uint p0, address p1) internal view {
|
||
| 202 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1));
|
||
| 203 |
} |
||
| 204 | |||
| 205 |
function log(string memory p0, uint p1) internal view {
|
||
| 206 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1));
|
||
| 207 |
} |
||
| 208 | |||
| 209 |
function log(string memory p0, string memory p1) internal view {
|
||
| 210 |
_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
|
||
| 211 |
} |
||
| 212 | |||
| 213 |
function log(string memory p0, bool p1) internal view {
|
||
| 214 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
|
||
| 215 |
} |
||
| 216 | |||
| 217 |
function log(string memory p0, address p1) internal view {
|
||
| 218 |
_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
|
||
| 219 |
} |
||
| 220 | |||
| 221 |
function log(bool p0, uint p1) internal view {
|
||
| 222 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1));
|
||
| 223 |
} |
||
| 224 | |||
| 225 |
function log(bool p0, string memory p1) internal view {
|
||
| 226 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
|
||
| 227 |
} |
||
| 228 | |||
| 229 |
function log(bool p0, bool p1) internal view {
|
||
| 230 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
|
||
| 231 |
} |
||
| 232 | |||
| 233 |
function log(bool p0, address p1) internal view {
|
||
| 234 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
|
||
| 235 |
} |
||
| 236 | |||
| 237 |
function log(address p0, uint p1) internal view {
|
||
| 238 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1));
|
||
| 239 |
} |
||
| 240 | |||
| 241 |
function log(address p0, string memory p1) internal view {
|
||
| 242 |
_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
|
||
| 243 |
} |
||
| 244 | |||
| 245 |
function log(address p0, bool p1) internal view {
|
||
| 246 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
|
||
| 247 |
} |
||
| 248 | |||
| 249 |
function log(address p0, address p1) internal view {
|
||
| 250 |
_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
|
||
| 251 |
} |
||
| 252 | |||
| 253 |
function log(uint p0, uint p1, uint p2) internal view {
|
||
| 254 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2));
|
||
| 255 |
} |
||
| 256 | |||
| 257 |
function log(uint p0, uint p1, string memory p2) internal view {
|
||
| 258 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2));
|
||
| 259 |
} |
||
| 260 | |||
| 261 |
function log(uint p0, uint p1, bool p2) internal view {
|
||
| 262 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2));
|
||
| 263 |
} |
||
| 264 | |||
| 265 |
function log(uint p0, uint p1, address p2) internal view {
|
||
| 266 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2));
|
||
| 267 |
} |
||
| 268 | |||
| 269 |
function log(uint p0, string memory p1, uint p2) internal view {
|
||
| 270 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2));
|
||
| 271 |
} |
||
| 272 | |||
| 273 |
function log(uint p0, string memory p1, string memory p2) internal view {
|
||
| 274 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2));
|
||
| 275 |
} |
||
| 276 | |||
| 277 |
function log(uint p0, string memory p1, bool p2) internal view {
|
||
| 278 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2));
|
||
| 279 |
} |
||
| 280 | |||
| 281 |
function log(uint p0, string memory p1, address p2) internal view {
|
||
| 282 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2));
|
||
| 283 |
} |
||
| 284 | |||
| 285 |
function log(uint p0, bool p1, uint p2) internal view {
|
||
| 286 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2));
|
||
| 287 |
} |
||
| 288 | |||
| 289 |
function log(uint p0, bool p1, string memory p2) internal view {
|
||
| 290 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2));
|
||
| 291 |
} |
||
| 292 | |||
| 293 |
function log(uint p0, bool p1, bool p2) internal view {
|
||
| 294 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2));
|
||
| 295 |
} |
||
| 296 | |||
| 297 |
function log(uint p0, bool p1, address p2) internal view {
|
||
| 298 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2));
|
||
| 299 |
} |
||
| 300 | |||
| 301 |
function log(uint p0, address p1, uint p2) internal view {
|
||
| 302 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2));
|
||
| 303 |
} |
||
| 304 | |||
| 305 |
function log(uint p0, address p1, string memory p2) internal view {
|
||
| 306 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2));
|
||
| 307 |
} |
||
| 308 | |||
| 309 |
function log(uint p0, address p1, bool p2) internal view {
|
||
| 310 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2));
|
||
| 311 |
} |
||
| 312 | |||
| 313 |
function log(uint p0, address p1, address p2) internal view {
|
||
| 314 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2));
|
||
| 315 |
} |
||
| 316 | |||
| 317 |
function log(string memory p0, uint p1, uint p2) internal view {
|
||
| 318 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2));
|
||
| 319 |
} |
||
| 320 | |||
| 321 |
function log(string memory p0, uint p1, string memory p2) internal view {
|
||
| 322 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2));
|
||
| 323 |
} |
||
| 324 | |||
| 325 |
function log(string memory p0, uint p1, bool p2) internal view {
|
||
| 326 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2));
|
||
| 327 |
} |
||
| 328 | |||
| 329 |
function log(string memory p0, uint p1, address p2) internal view {
|
||
| 330 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2));
|
||
| 331 |
} |
||
| 332 | |||
| 333 |
function log(string memory p0, string memory p1, uint p2) internal view {
|
||
| 334 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2));
|
||
| 335 |
} |
||
| 336 | |||
| 337 |
function log(string memory p0, string memory p1, string memory p2) internal view {
|
||
| 338 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
|
||
| 339 |
} |
||
| 340 | |||
| 341 |
function log(string memory p0, string memory p1, bool p2) internal view {
|
||
| 342 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
|
||
| 343 |
} |
||
| 344 | |||
| 345 |
function log(string memory p0, string memory p1, address p2) internal view {
|
||
| 346 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
|
||
| 347 |
} |
||
| 348 | |||
| 349 |
function log(string memory p0, bool p1, uint p2) internal view {
|
||
| 350 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2));
|
||
| 351 |
} |
||
| 352 | |||
| 353 |
function log(string memory p0, bool p1, string memory p2) internal view {
|
||
| 354 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
|
||
| 355 |
} |
||
| 356 | |||
| 357 |
function log(string memory p0, bool p1, bool p2) internal view {
|
||
| 358 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
|
||
| 359 |
} |
||
| 360 | |||
| 361 |
function log(string memory p0, bool p1, address p2) internal view {
|
||
| 362 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
|
||
| 363 |
} |
||
| 364 | |||
| 365 |
function log(string memory p0, address p1, uint p2) internal view {
|
||
| 366 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2));
|
||
| 367 |
} |
||
| 368 | |||
| 369 |
function log(string memory p0, address p1, string memory p2) internal view {
|
||
| 370 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
|
||
| 371 |
} |
||
| 372 | |||
| 373 |
function log(string memory p0, address p1, bool p2) internal view {
|
||
| 374 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
|
||
| 375 |
} |
||
| 376 | |||
| 377 |
function log(string memory p0, address p1, address p2) internal view {
|
||
| 378 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
|
||
| 379 |
} |
||
| 380 | |||
| 381 |
function log(bool p0, uint p1, uint p2) internal view {
|
||
| 382 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2));
|
||
| 383 |
} |
||
| 384 | |||
| 385 |
function log(bool p0, uint p1, string memory p2) internal view {
|
||
| 386 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2));
|
||
| 387 |
} |
||
| 388 | |||
| 389 |
function log(bool p0, uint p1, bool p2) internal view {
|
||
| 390 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2));
|
||
| 391 |
} |
||
| 392 | |||
| 393 |
function log(bool p0, uint p1, address p2) internal view {
|
||
| 394 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2));
|
||
| 395 |
} |
||
| 396 | |||
| 397 |
function log(bool p0, string memory p1, uint p2) internal view {
|
||
| 398 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2));
|
||
| 399 |
} |
||
| 400 | |||
| 401 |
function log(bool p0, string memory p1, string memory p2) internal view {
|
||
| 402 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
|
||
| 403 |
} |
||
| 404 | |||
| 405 |
function log(bool p0, string memory p1, bool p2) internal view {
|
||
| 406 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
|
||
| 407 |
} |
||
| 408 | |||
| 409 |
function log(bool p0, string memory p1, address p2) internal view {
|
||
| 410 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
|
||
| 411 |
} |
||
| 412 | |||
| 413 |
function log(bool p0, bool p1, uint p2) internal view {
|
||
| 414 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2));
|
||
| 415 |
} |
||
| 416 | |||
| 417 |
function log(bool p0, bool p1, string memory p2) internal view {
|
||
| 418 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
|
||
| 419 |
} |
||
| 420 | |||
| 421 |
function log(bool p0, bool p1, bool p2) internal view {
|
||
| 422 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
|
||
| 423 |
} |
||
| 424 | |||
| 425 |
function log(bool p0, bool p1, address p2) internal view {
|
||
| 426 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
|
||
| 427 |
} |
||
| 428 | |||
| 429 |
function log(bool p0, address p1, uint p2) internal view {
|
||
| 430 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2));
|
||
| 431 |
} |
||
| 432 | |||
| 433 |
function log(bool p0, address p1, string memory p2) internal view {
|
||
| 434 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
|
||
| 435 |
} |
||
| 436 | |||
| 437 |
function log(bool p0, address p1, bool p2) internal view {
|
||
| 438 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
|
||
| 439 |
} |
||
| 440 | |||
| 441 |
function log(bool p0, address p1, address p2) internal view {
|
||
| 442 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
|
||
| 443 |
} |
||
| 444 | |||
| 445 |
function log(address p0, uint p1, uint p2) internal view {
|
||
| 446 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2));
|
||
| 447 |
} |
||
| 448 | |||
| 449 |
function log(address p0, uint p1, string memory p2) internal view {
|
||
| 450 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2));
|
||
| 451 |
} |
||
| 452 | |||
| 453 |
function log(address p0, uint p1, bool p2) internal view {
|
||
| 454 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2));
|
||
| 455 |
} |
||
| 456 | |||
| 457 |
function log(address p0, uint p1, address p2) internal view {
|
||
| 458 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2));
|
||
| 459 |
} |
||
| 460 | |||
| 461 |
function log(address p0, string memory p1, uint p2) internal view {
|
||
| 462 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2));
|
||
| 463 |
} |
||
| 464 | |||
| 465 |
function log(address p0, string memory p1, string memory p2) internal view {
|
||
| 466 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
|
||
| 467 |
} |
||
| 468 | |||
| 469 |
function log(address p0, string memory p1, bool p2) internal view {
|
||
| 470 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
|
||
| 471 |
} |
||
| 472 | |||
| 473 |
function log(address p0, string memory p1, address p2) internal view {
|
||
| 474 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
|
||
| 475 |
} |
||
| 476 | |||
| 477 |
function log(address p0, bool p1, uint p2) internal view {
|
||
| 478 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2));
|
||
| 479 |
} |
||
| 480 | |||
| 481 |
function log(address p0, bool p1, string memory p2) internal view {
|
||
| 482 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
|
||
| 483 |
} |
||
| 484 | |||
| 485 |
function log(address p0, bool p1, bool p2) internal view {
|
||
| 486 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
|
||
| 487 |
} |
||
| 488 | |||
| 489 |
function log(address p0, bool p1, address p2) internal view {
|
||
| 490 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
|
||
| 491 |
} |
||
| 492 | |||
| 493 |
function log(address p0, address p1, uint p2) internal view {
|
||
| 494 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2));
|
||
| 495 |
} |
||
| 496 | |||
| 497 |
function log(address p0, address p1, string memory p2) internal view {
|
||
| 498 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
|
||
| 499 |
} |
||
| 500 | |||
| 501 |
function log(address p0, address p1, bool p2) internal view {
|
||
| 502 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
|
||
| 503 |
} |
||
| 504 | |||
| 505 |
function log(address p0, address p1, address p2) internal view {
|
||
| 506 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
|
||
| 507 |
} |
||
| 508 | |||
| 509 |
function log(uint p0, uint p1, uint p2, uint p3) internal view {
|
||
| 510 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3));
|
||
| 511 |
} |
||
| 512 | |||
| 513 |
function log(uint p0, uint p1, uint p2, string memory p3) internal view {
|
||
| 514 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3));
|
||
| 515 |
} |
||
| 516 | |||
| 517 |
function log(uint p0, uint p1, uint p2, bool p3) internal view {
|
||
| 518 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3));
|
||
| 519 |
} |
||
| 520 | |||
| 521 |
function log(uint p0, uint p1, uint p2, address p3) internal view {
|
||
| 522 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3));
|
||
| 523 |
} |
||
| 524 | |||
| 525 |
function log(uint p0, uint p1, string memory p2, uint p3) internal view {
|
||
| 526 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3));
|
||
| 527 |
} |
||
| 528 | |||
| 529 |
function log(uint p0, uint p1, string memory p2, string memory p3) internal view {
|
||
| 530 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3));
|
||
| 531 |
} |
||
| 532 | |||
| 533 |
function log(uint p0, uint p1, string memory p2, bool p3) internal view {
|
||
| 534 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3));
|
||
| 535 |
} |
||
| 536 | |||
| 537 |
function log(uint p0, uint p1, string memory p2, address p3) internal view {
|
||
| 538 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3));
|
||
| 539 |
} |
||
| 540 | |||
| 541 |
function log(uint p0, uint p1, bool p2, uint p3) internal view {
|
||
| 542 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3));
|
||
| 543 |
} |
||
| 544 | |||
| 545 |
function log(uint p0, uint p1, bool p2, string memory p3) internal view {
|
||
| 546 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3));
|
||
| 547 |
} |
||
| 548 | |||
| 549 |
function log(uint p0, uint p1, bool p2, bool p3) internal view {
|
||
| 550 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3));
|
||
| 551 |
} |
||
| 552 | |||
| 553 |
function log(uint p0, uint p1, bool p2, address p3) internal view {
|
||
| 554 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3));
|
||
| 555 |
} |
||
| 556 | |||
| 557 |
function log(uint p0, uint p1, address p2, uint p3) internal view {
|
||
| 558 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3));
|
||
| 559 |
} |
||
| 560 | |||
| 561 |
function log(uint p0, uint p1, address p2, string memory p3) internal view {
|
||
| 562 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3));
|
||
| 563 |
} |
||
| 564 | |||
| 565 |
function log(uint p0, uint p1, address p2, bool p3) internal view {
|
||
| 566 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3));
|
||
| 567 |
} |
||
| 568 | |||
| 569 |
function log(uint p0, uint p1, address p2, address p3) internal view {
|
||
| 570 |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3));
|
||
| 571 |
} |
||
| 572 | |||
| 573 |
function log(uint p0, string memory p1, uint p2, uint p3) internal view {
|
||
| 574 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3));
|
||
| 575 |
} |
||
| 576 | |||
| 577 |
function log(uint p0, string memory p1, uint p2, string memory p3) internal view {
|
||
| 578 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3));
|
||
| 579 |
} |
||
| 580 | |||
| 581 |
function log(uint p0, string memory p1, uint p2, bool p3) internal view {
|
||
| 582 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3));
|
||
| 583 |
} |
||
| 584 | |||
| 585 |
function log(uint p0, string memory p1, uint p2, address p3) internal view {
|
||
| 586 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3));
|
||
| 587 |
} |
||
| 588 | |||
| 589 |
function log(uint p0, string memory p1, string memory p2, uint p3) internal view {
|
||
| 590 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3));
|
||
| 591 |
} |
||
| 592 | |||
| 593 |
function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {
|
||
| 594 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3));
|
||
| 595 |
} |
||
| 596 | |||
| 597 |
function log(uint p0, string memory p1, string memory p2, bool p3) internal view {
|
||
| 598 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3));
|
||
| 599 |
} |
||
| 600 | |||
| 601 |
function log(uint p0, string memory p1, string memory p2, address p3) internal view {
|
||
| 602 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3));
|
||
| 603 |
} |
||
| 604 | |||
| 605 |
function log(uint p0, string memory p1, bool p2, uint p3) internal view {
|
||
| 606 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3));
|
||
| 607 |
} |
||
| 608 | |||
| 609 |
function log(uint p0, string memory p1, bool p2, string memory p3) internal view {
|
||
| 610 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3));
|
||
| 611 |
} |
||
| 612 | |||
| 613 |
function log(uint p0, string memory p1, bool p2, bool p3) internal view {
|
||
| 614 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3));
|
||
| 615 |
} |
||
| 616 | |||
| 617 |
function log(uint p0, string memory p1, bool p2, address p3) internal view {
|
||
| 618 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3));
|
||
| 619 |
} |
||
| 620 | |||
| 621 |
function log(uint p0, string memory p1, address p2, uint p3) internal view {
|
||
| 622 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3));
|
||
| 623 |
} |
||
| 624 | |||
| 625 |
function log(uint p0, string memory p1, address p2, string memory p3) internal view {
|
||
| 626 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3));
|
||
| 627 |
} |
||
| 628 | |||
| 629 |
function log(uint p0, string memory p1, address p2, bool p3) internal view {
|
||
| 630 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3));
|
||
| 631 |
} |
||
| 632 | |||
| 633 |
function log(uint p0, string memory p1, address p2, address p3) internal view {
|
||
| 634 |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3));
|
||
| 635 |
} |
||
| 636 | |||
| 637 |
function log(uint p0, bool p1, uint p2, uint p3) internal view {
|
||
| 638 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3));
|
||
| 639 |
} |
||
| 640 | |||
| 641 |
function log(uint p0, bool p1, uint p2, string memory p3) internal view {
|
||
| 642 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3));
|
||
| 643 |
} |
||
| 644 | |||
| 645 |
function log(uint p0, bool p1, uint p2, bool p3) internal view {
|
||
| 646 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3));
|
||
| 647 |
} |
||
| 648 | |||
| 649 |
function log(uint p0, bool p1, uint p2, address p3) internal view {
|
||
| 650 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3));
|
||
| 651 |
} |
||
| 652 | |||
| 653 |
function log(uint p0, bool p1, string memory p2, uint p3) internal view {
|
||
| 654 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3));
|
||
| 655 |
} |
||
| 656 | |||
| 657 |
function log(uint p0, bool p1, string memory p2, string memory p3) internal view {
|
||
| 658 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3));
|
||
| 659 |
} |
||
| 660 | |||
| 661 |
function log(uint p0, bool p1, string memory p2, bool p3) internal view {
|
||
| 662 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3));
|
||
| 663 |
} |
||
| 664 | |||
| 665 |
function log(uint p0, bool p1, string memory p2, address p3) internal view {
|
||
| 666 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3));
|
||
| 667 |
} |
||
| 668 | |||
| 669 |
function log(uint p0, bool p1, bool p2, uint p3) internal view {
|
||
| 670 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3));
|
||
| 671 |
} |
||
| 672 | |||
| 673 |
function log(uint p0, bool p1, bool p2, string memory p3) internal view {
|
||
| 674 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3));
|
||
| 675 |
} |
||
| 676 | |||
| 677 |
function log(uint p0, bool p1, bool p2, bool p3) internal view {
|
||
| 678 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3));
|
||
| 679 |
} |
||
| 680 | |||
| 681 |
function log(uint p0, bool p1, bool p2, address p3) internal view {
|
||
| 682 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3));
|
||
| 683 |
} |
||
| 684 | |||
| 685 |
function log(uint p0, bool p1, address p2, uint p3) internal view {
|
||
| 686 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3));
|
||
| 687 |
} |
||
| 688 | |||
| 689 |
function log(uint p0, bool p1, address p2, string memory p3) internal view {
|
||
| 690 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3));
|
||
| 691 |
} |
||
| 692 | |||
| 693 |
function log(uint p0, bool p1, address p2, bool p3) internal view {
|
||
| 694 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3));
|
||
| 695 |
} |
||
| 696 | |||
| 697 |
function log(uint p0, bool p1, address p2, address p3) internal view {
|
||
| 698 |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3));
|
||
| 699 |
} |
||
| 700 | |||
| 701 |
function log(uint p0, address p1, uint p2, uint p3) internal view {
|
||
| 702 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3));
|
||
| 703 |
} |
||
| 704 | |||
| 705 |
function log(uint p0, address p1, uint p2, string memory p3) internal view {
|
||
| 706 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3));
|
||
| 707 |
} |
||
| 708 | |||
| 709 |
function log(uint p0, address p1, uint p2, bool p3) internal view {
|
||
| 710 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3));
|
||
| 711 |
} |
||
| 712 | |||
| 713 |
function log(uint p0, address p1, uint p2, address p3) internal view {
|
||
| 714 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3));
|
||
| 715 |
} |
||
| 716 | |||
| 717 |
function log(uint p0, address p1, string memory p2, uint p3) internal view {
|
||
| 718 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3));
|
||
| 719 |
} |
||
| 720 | |||
| 721 |
function log(uint p0, address p1, string memory p2, string memory p3) internal view {
|
||
| 722 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3));
|
||
| 723 |
} |
||
| 724 | |||
| 725 |
function log(uint p0, address p1, string memory p2, bool p3) internal view {
|
||
| 726 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3));
|
||
| 727 |
} |
||
| 728 | |||
| 729 |
function log(uint p0, address p1, string memory p2, address p3) internal view {
|
||
| 730 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3));
|
||
| 731 |
} |
||
| 732 | |||
| 733 |
function log(uint p0, address p1, bool p2, uint p3) internal view {
|
||
| 734 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3));
|
||
| 735 |
} |
||
| 736 | |||
| 737 |
function log(uint p0, address p1, bool p2, string memory p3) internal view {
|
||
| 738 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3));
|
||
| 739 |
} |
||
| 740 | |||
| 741 |
function log(uint p0, address p1, bool p2, bool p3) internal view {
|
||
| 742 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3));
|
||
| 743 |
} |
||
| 744 | |||
| 745 |
function log(uint p0, address p1, bool p2, address p3) internal view {
|
||
| 746 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3));
|
||
| 747 |
} |
||
| 748 | |||
| 749 |
function log(uint p0, address p1, address p2, uint p3) internal view {
|
||
| 750 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3));
|
||
| 751 |
} |
||
| 752 | |||
| 753 |
function log(uint p0, address p1, address p2, string memory p3) internal view {
|
||
| 754 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3));
|
||
| 755 |
} |
||
| 756 | |||
| 757 |
function log(uint p0, address p1, address p2, bool p3) internal view {
|
||
| 758 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3));
|
||
| 759 |
} |
||
| 760 | |||
| 761 |
function log(uint p0, address p1, address p2, address p3) internal view {
|
||
| 762 |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3));
|
||
| 763 |
} |
||
| 764 | |||
| 765 |
function log(string memory p0, uint p1, uint p2, uint p3) internal view {
|
||
| 766 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3));
|
||
| 767 |
} |
||
| 768 | |||
| 769 |
function log(string memory p0, uint p1, uint p2, string memory p3) internal view {
|
||
| 770 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3));
|
||
| 771 |
} |
||
| 772 | |||
| 773 |
function log(string memory p0, uint p1, uint p2, bool p3) internal view {
|
||
| 774 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3));
|
||
| 775 |
} |
||
| 776 | |||
| 777 |
function log(string memory p0, uint p1, uint p2, address p3) internal view {
|
||
| 778 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3));
|
||
| 779 |
} |
||
| 780 | |||
| 781 |
function log(string memory p0, uint p1, string memory p2, uint p3) internal view {
|
||
| 782 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3));
|
||
| 783 |
} |
||
| 784 | |||
| 785 |
function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {
|
||
| 786 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3));
|
||
| 787 |
} |
||
| 788 | |||
| 789 |
function log(string memory p0, uint p1, string memory p2, bool p3) internal view {
|
||
| 790 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3));
|
||
| 791 |
} |
||
| 792 | |||
| 793 |
function log(string memory p0, uint p1, string memory p2, address p3) internal view {
|
||
| 794 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3));
|
||
| 795 |
} |
||
| 796 | |||
| 797 |
function log(string memory p0, uint p1, bool p2, uint p3) internal view {
|
||
| 798 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3));
|
||
| 799 |
} |
||
| 800 | |||
| 801 |
function log(string memory p0, uint p1, bool p2, string memory p3) internal view {
|
||
| 802 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3));
|
||
| 803 |
} |
||
| 804 | |||
| 805 |
function log(string memory p0, uint p1, bool p2, bool p3) internal view {
|
||
| 806 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3));
|
||
| 807 |
} |
||
| 808 | |||
| 809 |
function log(string memory p0, uint p1, bool p2, address p3) internal view {
|
||
| 810 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3));
|
||
| 811 |
} |
||
| 812 | |||
| 813 |
function log(string memory p0, uint p1, address p2, uint p3) internal view {
|
||
| 814 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3));
|
||
| 815 |
} |
||
| 816 | |||
| 817 |
function log(string memory p0, uint p1, address p2, string memory p3) internal view {
|
||
| 818 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3));
|
||
| 819 |
} |
||
| 820 | |||
| 821 |
function log(string memory p0, uint p1, address p2, bool p3) internal view {
|
||
| 822 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3));
|
||
| 823 |
} |
||
| 824 | |||
| 825 |
function log(string memory p0, uint p1, address p2, address p3) internal view {
|
||
| 826 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3));
|
||
| 827 |
} |
||
| 828 | |||
| 829 |
function log(string memory p0, string memory p1, uint p2, uint p3) internal view {
|
||
| 830 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3));
|
||
| 831 |
} |
||
| 832 | |||
| 833 |
function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {
|
||
| 834 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3));
|
||
| 835 |
} |
||
| 836 | |||
| 837 |
function log(string memory p0, string memory p1, uint p2, bool p3) internal view {
|
||
| 838 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3));
|
||
| 839 |
} |
||
| 840 | |||
| 841 |
function log(string memory p0, string memory p1, uint p2, address p3) internal view {
|
||
| 842 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3));
|
||
| 843 |
} |
||
| 844 | |||
| 845 |
function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {
|
||
| 846 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3));
|
||
| 847 |
} |
||
| 848 | |||
| 849 |
function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {
|
||
| 850 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
|
||
| 851 |
} |
||
| 852 | |||
| 853 |
function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {
|
||
| 854 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
|
||
| 855 |
} |
||
| 856 | |||
| 857 |
function log(string memory p0, string memory p1, string memory p2, address p3) internal view {
|
||
| 858 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
|
||
| 859 |
} |
||
| 860 | |||
| 861 |
function log(string memory p0, string memory p1, bool p2, uint p3) internal view {
|
||
| 862 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3));
|
||
| 863 |
} |
||
| 864 | |||
| 865 |
function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {
|
||
| 866 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
|
||
| 867 |
} |
||
| 868 | |||
| 869 |
function log(string memory p0, string memory p1, bool p2, bool p3) internal view {
|
||
| 870 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
|
||
| 871 |
} |
||
| 872 | |||
| 873 |
function log(string memory p0, string memory p1, bool p2, address p3) internal view {
|
||
| 874 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
|
||
| 875 |
} |
||
| 876 | |||
| 877 |
function log(string memory p0, string memory p1, address p2, uint p3) internal view {
|
||
| 878 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3));
|
||
| 879 |
} |
||
| 880 | |||
| 881 |
function log(string memory p0, string memory p1, address p2, string memory p3) internal view {
|
||
| 882 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
|
||
| 883 |
} |
||
| 884 | |||
| 885 |
function log(string memory p0, string memory p1, address p2, bool p3) internal view {
|
||
| 886 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
|
||
| 887 |
} |
||
| 888 | |||
| 889 |
function log(string memory p0, string memory p1, address p2, address p3) internal view {
|
||
| 890 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
|
||
| 891 |
} |
||
| 892 | |||
| 893 |
function log(string memory p0, bool p1, uint p2, uint p3) internal view {
|
||
| 894 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3));
|
||
| 895 |
} |
||
| 896 | |||
| 897 |
function log(string memory p0, bool p1, uint p2, string memory p3) internal view {
|
||
| 898 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3));
|
||
| 899 |
} |
||
| 900 | |||
| 901 |
function log(string memory p0, bool p1, uint p2, bool p3) internal view {
|
||
| 902 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3));
|
||
| 903 |
} |
||
| 904 | |||
| 905 |
function log(string memory p0, bool p1, uint p2, address p3) internal view {
|
||
| 906 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3));
|
||
| 907 |
} |
||
| 908 | |||
| 909 |
function log(string memory p0, bool p1, string memory p2, uint p3) internal view {
|
||
| 910 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3));
|
||
| 911 |
} |
||
| 912 | |||
| 913 |
function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {
|
||
| 914 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
|
||
| 915 |
} |
||
| 916 | |||
| 917 |
function log(string memory p0, bool p1, string memory p2, bool p3) internal view {
|
||
| 918 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
|
||
| 919 |
} |
||
| 920 | |||
| 921 |
function log(string memory p0, bool p1, string memory p2, address p3) internal view {
|
||
| 922 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
|
||
| 923 |
} |
||
| 924 | |||
| 925 |
function log(string memory p0, bool p1, bool p2, uint p3) internal view {
|
||
| 926 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3));
|
||
| 927 |
} |
||
| 928 | |||
| 929 |
function log(string memory p0, bool p1, bool p2, string memory p3) internal view {
|
||
| 930 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
|
||
| 931 |
} |
||
| 932 | |||
| 933 |
function log(string memory p0, bool p1, bool p2, bool p3) internal view {
|
||
| 934 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
|
||
| 935 |
} |
||
| 936 | |||
| 937 |
function log(string memory p0, bool p1, bool p2, address p3) internal view {
|
||
| 938 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
|
||
| 939 |
} |
||
| 940 | |||
| 941 |
function log(string memory p0, bool p1, address p2, uint p3) internal view {
|
||
| 942 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3));
|
||
| 943 |
} |
||
| 944 | |||
| 945 |
function log(string memory p0, bool p1, address p2, string memory p3) internal view {
|
||
| 946 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
|
||
| 947 |
} |
||
| 948 | |||
| 949 |
function log(string memory p0, bool p1, address p2, bool p3) internal view {
|
||
| 950 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
|
||
| 951 |
} |
||
| 952 | |||
| 953 |
function log(string memory p0, bool p1, address p2, address p3) internal view {
|
||
| 954 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
|
||
| 955 |
} |
||
| 956 | |||
| 957 |
function log(string memory p0, address p1, uint p2, uint p3) internal view {
|
||
| 958 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3));
|
||
| 959 |
} |
||
| 960 | |||
| 961 |
function log(string memory p0, address p1, uint p2, string memory p3) internal view {
|
||
| 962 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3));
|
||
| 963 |
} |
||
| 964 | |||
| 965 |
function log(string memory p0, address p1, uint p2, bool p3) internal view {
|
||
| 966 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3));
|
||
| 967 |
} |
||
| 968 | |||
| 969 |
function log(string memory p0, address p1, uint p2, address p3) internal view {
|
||
| 970 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3));
|
||
| 971 |
} |
||
| 972 | |||
| 973 |
function log(string memory p0, address p1, string memory p2, uint p3) internal view {
|
||
| 974 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3));
|
||
| 975 |
} |
||
| 976 | |||
| 977 |
function log(string memory p0, address p1, string memory p2, string memory p3) internal view {
|
||
| 978 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
|
||
| 979 |
} |
||
| 980 | |||
| 981 |
function log(string memory p0, address p1, string memory p2, bool p3) internal view {
|
||
| 982 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
|
||
| 983 |
} |
||
| 984 | |||
| 985 |
function log(string memory p0, address p1, string memory p2, address p3) internal view {
|
||
| 986 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
|
||
| 987 |
} |
||
| 988 | |||
| 989 |
function log(string memory p0, address p1, bool p2, uint p3) internal view {
|
||
| 990 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3));
|
||
| 991 |
} |
||
| 992 | |||
| 993 |
function log(string memory p0, address p1, bool p2, string memory p3) internal view {
|
||
| 994 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
|
||
| 995 |
} |
||
| 996 | |||
| 997 |
function log(string memory p0, address p1, bool p2, bool p3) internal view {
|
||
| 998 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
|
||
| 999 |
} |
||
| 1000 | |||
| 1001 |
function log(string memory p0, address p1, bool p2, address p3) internal view {
|
||
| 1002 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
|
||
| 1003 |
} |
||
| 1004 | |||
| 1005 |
function log(string memory p0, address p1, address p2, uint p3) internal view {
|
||
| 1006 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3));
|
||
| 1007 |
} |
||
| 1008 | |||
| 1009 |
function log(string memory p0, address p1, address p2, string memory p3) internal view {
|
||
| 1010 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
|
||
| 1011 |
} |
||
| 1012 | |||
| 1013 |
function log(string memory p0, address p1, address p2, bool p3) internal view {
|
||
| 1014 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
|
||
| 1015 |
} |
||
| 1016 | |||
| 1017 |
function log(string memory p0, address p1, address p2, address p3) internal view {
|
||
| 1018 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
|
||
| 1019 |
} |
||
| 1020 | |||
| 1021 |
function log(bool p0, uint p1, uint p2, uint p3) internal view {
|
||
| 1022 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3));
|
||
| 1023 |
} |
||
| 1024 | |||
| 1025 |
function log(bool p0, uint p1, uint p2, string memory p3) internal view {
|
||
| 1026 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3));
|
||
| 1027 |
} |
||
| 1028 | |||
| 1029 |
function log(bool p0, uint p1, uint p2, bool p3) internal view {
|
||
| 1030 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3));
|
||
| 1031 |
} |
||
| 1032 | |||
| 1033 |
function log(bool p0, uint p1, uint p2, address p3) internal view {
|
||
| 1034 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3));
|
||
| 1035 |
} |
||
| 1036 | |||
| 1037 |
function log(bool p0, uint p1, string memory p2, uint p3) internal view {
|
||
| 1038 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3));
|
||
| 1039 |
} |
||
| 1040 | |||
| 1041 |
function log(bool p0, uint p1, string memory p2, string memory p3) internal view {
|
||
| 1042 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3));
|
||
| 1043 |
} |
||
| 1044 | |||
| 1045 |
function log(bool p0, uint p1, string memory p2, bool p3) internal view {
|
||
| 1046 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3));
|
||
| 1047 |
} |
||
| 1048 | |||
| 1049 |
function log(bool p0, uint p1, string memory p2, address p3) internal view {
|
||
| 1050 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3));
|
||
| 1051 |
} |
||
| 1052 | |||
| 1053 |
function log(bool p0, uint p1, bool p2, uint p3) internal view {
|
||
| 1054 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3));
|
||
| 1055 |
} |
||
| 1056 | |||
| 1057 |
function log(bool p0, uint p1, bool p2, string memory p3) internal view {
|
||
| 1058 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3));
|
||
| 1059 |
} |
||
| 1060 | |||
| 1061 |
function log(bool p0, uint p1, bool p2, bool p3) internal view {
|
||
| 1062 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3));
|
||
| 1063 |
} |
||
| 1064 | |||
| 1065 |
function log(bool p0, uint p1, bool p2, address p3) internal view {
|
||
| 1066 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3));
|
||
| 1067 |
} |
||
| 1068 | |||
| 1069 |
function log(bool p0, uint p1, address p2, uint p3) internal view {
|
||
| 1070 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3));
|
||
| 1071 |
} |
||
| 1072 | |||
| 1073 |
function log(bool p0, uint p1, address p2, string memory p3) internal view {
|
||
| 1074 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3));
|
||
| 1075 |
} |
||
| 1076 | |||
| 1077 |
function log(bool p0, uint p1, address p2, bool p3) internal view {
|
||
| 1078 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3));
|
||
| 1079 |
} |
||
| 1080 | |||
| 1081 |
function log(bool p0, uint p1, address p2, address p3) internal view {
|
||
| 1082 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3));
|
||
| 1083 |
} |
||
| 1084 | |||
| 1085 |
function log(bool p0, string memory p1, uint p2, uint p3) internal view {
|
||
| 1086 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3));
|
||
| 1087 |
} |
||
| 1088 | |||
| 1089 |
function log(bool p0, string memory p1, uint p2, string memory p3) internal view {
|
||
| 1090 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3));
|
||
| 1091 |
} |
||
| 1092 | |||
| 1093 |
function log(bool p0, string memory p1, uint p2, bool p3) internal view {
|
||
| 1094 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3));
|
||
| 1095 |
} |
||
| 1096 | |||
| 1097 |
function log(bool p0, string memory p1, uint p2, address p3) internal view {
|
||
| 1098 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3));
|
||
| 1099 |
} |
||
| 1100 | |||
| 1101 |
function log(bool p0, string memory p1, string memory p2, uint p3) internal view {
|
||
| 1102 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3));
|
||
| 1103 |
} |
||
| 1104 | |||
| 1105 |
function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {
|
||
| 1106 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
|
||
| 1107 |
} |
||
| 1108 | |||
| 1109 |
function log(bool p0, string memory p1, string memory p2, bool p3) internal view {
|
||
| 1110 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
|
||
| 1111 |
} |
||
| 1112 | |||
| 1113 |
function log(bool p0, string memory p1, string memory p2, address p3) internal view {
|
||
| 1114 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
|
||
| 1115 |
} |
||
| 1116 | |||
| 1117 |
function log(bool p0, string memory p1, bool p2, uint p3) internal view {
|
||
| 1118 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3));
|
||
| 1119 |
} |
||
| 1120 | |||
| 1121 |
function log(bool p0, string memory p1, bool p2, string memory p3) internal view {
|
||
| 1122 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
|
||
| 1123 |
} |
||
| 1124 | |||
| 1125 |
function log(bool p0, string memory p1, bool p2, bool p3) internal view {
|
||
| 1126 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
|
||
| 1127 |
} |
||
| 1128 | |||
| 1129 |
function log(bool p0, string memory p1, bool p2, address p3) internal view {
|
||
| 1130 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
|
||
| 1131 |
} |
||
| 1132 | |||
| 1133 |
function log(bool p0, string memory p1, address p2, uint p3) internal view {
|
||
| 1134 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3));
|
||
| 1135 |
} |
||
| 1136 | |||
| 1137 |
function log(bool p0, string memory p1, address p2, string memory p3) internal view {
|
||
| 1138 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
|
||
| 1139 |
} |
||
| 1140 | |||
| 1141 |
function log(bool p0, string memory p1, address p2, bool p3) internal view {
|
||
| 1142 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
|
||
| 1143 |
} |
||
| 1144 | |||
| 1145 |
function log(bool p0, string memory p1, address p2, address p3) internal view {
|
||
| 1146 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
|
||
| 1147 |
} |
||
| 1148 | |||
| 1149 |
function log(bool p0, bool p1, uint p2, uint p3) internal view {
|
||
| 1150 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3));
|
||
| 1151 |
} |
||
| 1152 | |||
| 1153 |
function log(bool p0, bool p1, uint p2, string memory p3) internal view {
|
||
| 1154 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3));
|
||
| 1155 |
} |
||
| 1156 | |||
| 1157 |
function log(bool p0, bool p1, uint p2, bool p3) internal view {
|
||
| 1158 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3));
|
||
| 1159 |
} |
||
| 1160 | |||
| 1161 |
function log(bool p0, bool p1, uint p2, address p3) internal view {
|
||
| 1162 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3));
|
||
| 1163 |
} |
||
| 1164 | |||
| 1165 |
function log(bool p0, bool p1, string memory p2, uint p3) internal view {
|
||
| 1166 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3));
|
||
| 1167 |
} |
||
| 1168 | |||
| 1169 |
function log(bool p0, bool p1, string memory p2, string memory p3) internal view {
|
||
| 1170 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
|
||
| 1171 |
} |
||
| 1172 | |||
| 1173 |
function log(bool p0, bool p1, string memory p2, bool p3) internal view {
|
||
| 1174 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
|
||
| 1175 |
} |
||
| 1176 | |||
| 1177 |
function log(bool p0, bool p1, string memory p2, address p3) internal view {
|
||
| 1178 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
|
||
| 1179 |
} |
||
| 1180 | |||
| 1181 |
function log(bool p0, bool p1, bool p2, uint p3) internal view {
|
||
| 1182 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3));
|
||
| 1183 |
} |
||
| 1184 | |||
| 1185 |
function log(bool p0, bool p1, bool p2, string memory p3) internal view {
|
||
| 1186 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
|
||
| 1187 |
} |
||
| 1188 | |||
| 1189 |
function log(bool p0, bool p1, bool p2, bool p3) internal view {
|
||
| 1190 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
|
||
| 1191 |
} |
||
| 1192 | |||
| 1193 |
function log(bool p0, bool p1, bool p2, address p3) internal view {
|
||
| 1194 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
|
||
| 1195 |
} |
||
| 1196 | |||
| 1197 |
function log(bool p0, bool p1, address p2, uint p3) internal view {
|
||
| 1198 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3));
|
||
| 1199 |
} |
||
| 1200 | |||
| 1201 |
function log(bool p0, bool p1, address p2, string memory p3) internal view {
|
||
| 1202 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
|
||
| 1203 |
} |
||
| 1204 | |||
| 1205 |
function log(bool p0, bool p1, address p2, bool p3) internal view {
|
||
| 1206 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
|
||
| 1207 |
} |
||
| 1208 | |||
| 1209 |
function log(bool p0, bool p1, address p2, address p3) internal view {
|
||
| 1210 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
|
||
| 1211 |
} |
||
| 1212 | |||
| 1213 |
function log(bool p0, address p1, uint p2, uint p3) internal view {
|
||
| 1214 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3));
|
||
| 1215 |
} |
||
| 1216 | |||
| 1217 |
function log(bool p0, address p1, uint p2, string memory p3) internal view {
|
||
| 1218 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3));
|
||
| 1219 |
} |
||
| 1220 | |||
| 1221 |
function log(bool p0, address p1, uint p2, bool p3) internal view {
|
||
| 1222 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3));
|
||
| 1223 |
} |
||
| 1224 | |||
| 1225 |
function log(bool p0, address p1, uint p2, address p3) internal view {
|
||
| 1226 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3));
|
||
| 1227 |
} |
||
| 1228 | |||
| 1229 |
function log(bool p0, address p1, string memory p2, uint p3) internal view {
|
||
| 1230 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3));
|
||
| 1231 |
} |
||
| 1232 | |||
| 1233 |
function log(bool p0, address p1, string memory p2, string memory p3) internal view {
|
||
| 1234 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
|
||
| 1235 |
} |
||
| 1236 | |||
| 1237 |
function log(bool p0, address p1, string memory p2, bool p3) internal view {
|
||
| 1238 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
|
||
| 1239 |
} |
||
| 1240 | |||
| 1241 |
function log(bool p0, address p1, string memory p2, address p3) internal view {
|
||
| 1242 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
|
||
| 1243 |
} |
||
| 1244 | |||
| 1245 |
function log(bool p0, address p1, bool p2, uint p3) internal view {
|
||
| 1246 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3));
|
||
| 1247 |
} |
||
| 1248 | |||
| 1249 |
function log(bool p0, address p1, bool p2, string memory p3) internal view {
|
||
| 1250 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
|
||
| 1251 |
} |
||
| 1252 | |||
| 1253 |
function log(bool p0, address p1, bool p2, bool p3) internal view {
|
||
| 1254 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
|
||
| 1255 |
} |
||
| 1256 | |||
| 1257 |
function log(bool p0, address p1, bool p2, address p3) internal view {
|
||
| 1258 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
|
||
| 1259 |
} |
||
| 1260 | |||
| 1261 |
function log(bool p0, address p1, address p2, uint p3) internal view {
|
||
| 1262 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3));
|
||
| 1263 |
} |
||
| 1264 | |||
| 1265 |
function log(bool p0, address p1, address p2, string memory p3) internal view {
|
||
| 1266 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
|
||
| 1267 |
} |
||
| 1268 | |||
| 1269 |
function log(bool p0, address p1, address p2, bool p3) internal view {
|
||
| 1270 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
|
||
| 1271 |
} |
||
| 1272 | |||
| 1273 |
function log(bool p0, address p1, address p2, address p3) internal view {
|
||
| 1274 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
|
||
| 1275 |
} |
||
| 1276 | |||
| 1277 |
function log(address p0, uint p1, uint p2, uint p3) internal view {
|
||
| 1278 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3));
|
||
| 1279 |
} |
||
| 1280 | |||
| 1281 |
function log(address p0, uint p1, uint p2, string memory p3) internal view {
|
||
| 1282 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3));
|
||
| 1283 |
} |
||
| 1284 | |||
| 1285 |
function log(address p0, uint p1, uint p2, bool p3) internal view {
|
||
| 1286 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3));
|
||
| 1287 |
} |
||
| 1288 | |||
| 1289 |
function log(address p0, uint p1, uint p2, address p3) internal view {
|
||
| 1290 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3));
|
||
| 1291 |
} |
||
| 1292 | |||
| 1293 |
function log(address p0, uint p1, string memory p2, uint p3) internal view {
|
||
| 1294 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3));
|
||
| 1295 |
} |
||
| 1296 | |||
| 1297 |
function log(address p0, uint p1, string memory p2, string memory p3) internal view {
|
||
| 1298 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3));
|
||
| 1299 |
} |
||
| 1300 | |||
| 1301 |
function log(address p0, uint p1, string memory p2, bool p3) internal view {
|
||
| 1302 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3));
|
||
| 1303 |
} |
||
| 1304 | |||
| 1305 |
function log(address p0, uint p1, string memory p2, address p3) internal view {
|
||
| 1306 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3));
|
||
| 1307 |
} |
||
| 1308 | |||
| 1309 |
function log(address p0, uint p1, bool p2, uint p3) internal view {
|
||
| 1310 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3));
|
||
| 1311 |
} |
||
| 1312 | |||
| 1313 |
function log(address p0, uint p1, bool p2, string memory p3) internal view {
|
||
| 1314 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3));
|
||
| 1315 |
} |
||
| 1316 | |||
| 1317 |
function log(address p0, uint p1, bool p2, bool p3) internal view {
|
||
| 1318 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3));
|
||
| 1319 |
} |
||
| 1320 | |||
| 1321 |
function log(address p0, uint p1, bool p2, address p3) internal view {
|
||
| 1322 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3));
|
||
| 1323 |
} |
||
| 1324 | |||
| 1325 |
function log(address p0, uint p1, address p2, uint p3) internal view {
|
||
| 1326 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3));
|
||
| 1327 |
} |
||
| 1328 | |||
| 1329 |
function log(address p0, uint p1, address p2, string memory p3) internal view {
|
||
| 1330 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3));
|
||
| 1331 |
} |
||
| 1332 | |||
| 1333 |
function log(address p0, uint p1, address p2, bool p3) internal view {
|
||
| 1334 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3));
|
||
| 1335 |
} |
||
| 1336 | |||
| 1337 |
function log(address p0, uint p1, address p2, address p3) internal view {
|
||
| 1338 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3));
|
||
| 1339 |
} |
||
| 1340 | |||
| 1341 |
function log(address p0, string memory p1, uint p2, uint p3) internal view {
|
||
| 1342 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3));
|
||
| 1343 |
} |
||
| 1344 | |||
| 1345 |
function log(address p0, string memory p1, uint p2, string memory p3) internal view {
|
||
| 1346 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3));
|
||
| 1347 |
} |
||
| 1348 | |||
| 1349 |
function log(address p0, string memory p1, uint p2, bool p3) internal view {
|
||
| 1350 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3));
|
||
| 1351 |
} |
||
| 1352 | |||
| 1353 |
function log(address p0, string memory p1, uint p2, address p3) internal view {
|
||
| 1354 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3));
|
||
| 1355 |
} |
||
| 1356 | |||
| 1357 |
function log(address p0, string memory p1, string memory p2, uint p3) internal view {
|
||
| 1358 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3));
|
||
| 1359 |
} |
||
| 1360 | |||
| 1361 |
function log(address p0, string memory p1, string memory p2, string memory p3) internal view {
|
||
| 1362 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
|
||
| 1363 |
} |
||
| 1364 | |||
| 1365 |
function log(address p0, string memory p1, string memory p2, bool p3) internal view {
|
||
| 1366 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
|
||
| 1367 |
} |
||
| 1368 | |||
| 1369 |
function log(address p0, string memory p1, string memory p2, address p3) internal view {
|
||
| 1370 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
|
||
| 1371 |
} |
||
| 1372 | |||
| 1373 |
function log(address p0, string memory p1, bool p2, uint p3) internal view {
|
||
| 1374 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3));
|
||
| 1375 |
} |
||
| 1376 | |||
| 1377 |
function log(address p0, string memory p1, bool p2, string memory p3) internal view {
|
||
| 1378 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
|
||
| 1379 |
} |
||
| 1380 | |||
| 1381 |
function log(address p0, string memory p1, bool p2, bool p3) internal view {
|
||
| 1382 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
|
||
| 1383 |
} |
||
| 1384 | |||
| 1385 |
function log(address p0, string memory p1, bool p2, address p3) internal view {
|
||
| 1386 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
|
||
| 1387 |
} |
||
| 1388 | |||
| 1389 |
function log(address p0, string memory p1, address p2, uint p3) internal view {
|
||
| 1390 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3));
|
||
| 1391 |
} |
||
| 1392 | |||
| 1393 |
function log(address p0, string memory p1, address p2, string memory p3) internal view {
|
||
| 1394 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
|
||
| 1395 |
} |
||
| 1396 | |||
| 1397 |
function log(address p0, string memory p1, address p2, bool p3) internal view {
|
||
| 1398 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
|
||
| 1399 |
} |
||
| 1400 | |||
| 1401 |
function log(address p0, string memory p1, address p2, address p3) internal view {
|
||
| 1402 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
|
||
| 1403 |
} |
||
| 1404 | |||
| 1405 |
function log(address p0, bool p1, uint p2, uint p3) internal view {
|
||
| 1406 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3));
|
||
| 1407 |
} |
||
| 1408 | |||
| 1409 |
function log(address p0, bool p1, uint p2, string memory p3) internal view {
|
||
| 1410 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3));
|
||
| 1411 |
} |
||
| 1412 | |||
| 1413 |
function log(address p0, bool p1, uint p2, bool p3) internal view {
|
||
| 1414 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3));
|
||
| 1415 |
} |
||
| 1416 | |||
| 1417 |
function log(address p0, bool p1, uint p2, address p3) internal view {
|
||
| 1418 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3));
|
||
| 1419 |
} |
||
| 1420 | |||
| 1421 |
function log(address p0, bool p1, string memory p2, uint p3) internal view {
|
||
| 1422 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3));
|
||
| 1423 |
} |
||
| 1424 | |||
| 1425 |
function log(address p0, bool p1, string memory p2, string memory p3) internal view {
|
||
| 1426 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
|
||
| 1427 |
} |
||
| 1428 | |||
| 1429 |
function log(address p0, bool p1, string memory p2, bool p3) internal view {
|
||
| 1430 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
|
||
| 1431 |
} |
||
| 1432 | |||
| 1433 |
function log(address p0, bool p1, string memory p2, address p3) internal view {
|
||
| 1434 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
|
||
| 1435 |
} |
||
| 1436 | |||
| 1437 |
function log(address p0, bool p1, bool p2, uint p3) internal view {
|
||
| 1438 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3));
|
||
| 1439 |
} |
||
| 1440 | |||
| 1441 |
function log(address p0, bool p1, bool p2, string memory p3) internal view {
|
||
| 1442 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
|
||
| 1443 |
} |
||
| 1444 | |||
| 1445 |
function log(address p0, bool p1, bool p2, bool p3) internal view {
|
||
| 1446 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
|
||
| 1447 |
} |
||
| 1448 | |||
| 1449 |
function log(address p0, bool p1, bool p2, address p3) internal view {
|
||
| 1450 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
|
||
| 1451 |
} |
||
| 1452 | |||
| 1453 |
function log(address p0, bool p1, address p2, uint p3) internal view {
|
||
| 1454 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3));
|
||
| 1455 |
} |
||
| 1456 | |||
| 1457 |
function log(address p0, bool p1, address p2, string memory p3) internal view {
|
||
| 1458 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
|
||
| 1459 |
} |
||
| 1460 | |||
| 1461 |
function log(address p0, bool p1, address p2, bool p3) internal view {
|
||
| 1462 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
|
||
| 1463 |
} |
||
| 1464 | |||
| 1465 |
function log(address p0, bool p1, address p2, address p3) internal view {
|
||
| 1466 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
|
||
| 1467 |
} |
||
| 1468 | |||
| 1469 |
function log(address p0, address p1, uint p2, uint p3) internal view {
|
||
| 1470 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3));
|
||
| 1471 |
} |
||
| 1472 | |||
| 1473 |
function log(address p0, address p1, uint p2, string memory p3) internal view {
|
||
| 1474 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3));
|
||
| 1475 |
} |
||
| 1476 | |||
| 1477 |
function log(address p0, address p1, uint p2, bool p3) internal view {
|
||
| 1478 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3));
|
||
| 1479 |
} |
||
| 1480 | |||
| 1481 |
function log(address p0, address p1, uint p2, address p3) internal view {
|
||
| 1482 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3));
|
||
| 1483 |
} |
||
| 1484 | |||
| 1485 |
function log(address p0, address p1, string memory p2, uint p3) internal view {
|
||
| 1486 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3));
|
||
| 1487 |
} |
||
| 1488 | |||
| 1489 |
function log(address p0, address p1, string memory p2, string memory p3) internal view {
|
||
| 1490 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
|
||
| 1491 |
} |
||
| 1492 | |||
| 1493 |
function log(address p0, address p1, string memory p2, bool p3) internal view {
|
||
| 1494 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
|
||
| 1495 |
} |
||
| 1496 | |||
| 1497 |
function log(address p0, address p1, string memory p2, address p3) internal view {
|
||
| 1498 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
|
||
| 1499 |
} |
||
| 1500 | |||
| 1501 |
function log(address p0, address p1, bool p2, uint p3) internal view {
|
||
| 1502 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3));
|
||
| 1503 |
} |
||
| 1504 | |||
| 1505 |
function log(address p0, address p1, bool p2, string memory p3) internal view {
|
||
| 1506 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
|
||
| 1507 |
} |
||
| 1508 | |||
| 1509 |
function log(address p0, address p1, bool p2, bool p3) internal view {
|
||
| 1510 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
|
||
| 1511 |
} |
||
| 1512 | |||
| 1513 |
function log(address p0, address p1, bool p2, address p3) internal view {
|
||
| 1514 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
|
||
| 1515 |
} |
||
| 1516 | |||
| 1517 |
function log(address p0, address p1, address p2, uint p3) internal view {
|
||
| 1518 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3));
|
||
| 1519 |
} |
||
| 1520 | |||
| 1521 |
function log(address p0, address p1, address p2, string memory p3) internal view {
|
||
| 1522 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
|
||
| 1523 |
} |
||
| 1524 | |||
| 1525 |
function log(address p0, address p1, address p2, bool p3) internal view {
|
||
| 1526 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
|
||
| 1527 |
} |
||
| 1528 | |||
| 1529 |
function log(address p0, address p1, address p2, address p3) internal view {
|
||
| 1530 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
|
||
| 1531 |
} |
||
| 1532 | |||
| 1533 |
} |
| Lines covered: | 0 / 3 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.4.22 <0.9.0; |
||
| 3 | |||
| 4 |
/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should |
||
| 5 |
/// use `int256` and `uint256`. This modified version fixes that. This version is recommended |
||
| 6 |
/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in |
||
| 7 |
/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`. |
||
| 8 |
/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178 |
||
| 9 |
library console2 {
|
||
| 10 |
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); |
||
| 11 | |||
| 12 |
function _castLogPayloadViewToPure( |
||
| 13 |
function(bytes memory) internal view fnIn |
||
| 14 |
) internal pure returns (function(bytes memory) internal pure fnOut) {
|
||
| 15 |
assembly {
|
||
| 16 |
fnOut := fnIn |
||
| 17 |
} |
||
| 18 |
} |
||
| 19 | |||
| 20 |
function _sendLogPayload(bytes memory payload) internal pure {
|
||
| 21 |
_castLogPayloadViewToPure(_sendLogPayloadView)(payload); |
||
| 22 |
} |
||
| 23 | |||
| 24 |
function _sendLogPayloadView(bytes memory payload) private view {
|
||
| 25 |
uint256 payloadLength = payload.length; |
||
| 26 |
address consoleAddress = CONSOLE_ADDRESS; |
||
| 27 |
/// @solidity memory-safe-assembly |
||
| 28 |
assembly {
|
||
| 29 |
let payloadStart := add(payload, 32) |
||
| 30 |
let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) |
||
| 31 |
} |
||
| 32 |
} |
||
| 33 | |||
| 34 |
function log() internal pure {
|
||
| 35 |
_sendLogPayload(abi.encodeWithSignature("log()"));
|
||
| 36 |
} |
||
| 37 | |||
| 38 |
function logInt(int256 p0) internal pure {
|
||
| 39 |
_sendLogPayload(abi.encodeWithSignature("log(int256)", p0));
|
||
| 40 |
} |
||
| 41 | |||
| 42 |
function logUint(uint256 p0) internal pure {
|
||
| 43 |
_sendLogPayload(abi.encodeWithSignature("log(uint256)", p0));
|
||
| 44 |
} |
||
| 45 | |||
| 46 |
function logString(string memory p0) internal pure {
|
||
| 47 |
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
|
||
| 48 |
} |
||
| 49 | |||
| 50 |
function logBool(bool p0) internal pure {
|
||
| 51 |
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
|
||
| 52 |
} |
||
| 53 | |||
| 54 |
function logAddress(address p0) internal pure {
|
||
| 55 |
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
|
||
| 56 |
} |
||
| 57 | |||
| 58 |
function logBytes(bytes memory p0) internal pure {
|
||
| 59 |
_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
|
||
| 60 |
} |
||
| 61 | |||
| 62 |
function logBytes1(bytes1 p0) internal pure {
|
||
| 63 |
_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
|
||
| 64 |
} |
||
| 65 | |||
| 66 |
function logBytes2(bytes2 p0) internal pure {
|
||
| 67 |
_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
|
||
| 68 |
} |
||
| 69 | |||
| 70 |
function logBytes3(bytes3 p0) internal pure {
|
||
| 71 |
_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
|
||
| 72 |
} |
||
| 73 | |||
| 74 |
function logBytes4(bytes4 p0) internal pure {
|
||
| 75 |
_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
|
||
| 76 |
} |
||
| 77 | |||
| 78 |
function logBytes5(bytes5 p0) internal pure {
|
||
| 79 |
_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
|
||
| 80 |
} |
||
| 81 | |||
| 82 |
function logBytes6(bytes6 p0) internal pure {
|
||
| 83 |
_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
|
||
| 84 |
} |
||
| 85 | |||
| 86 |
function logBytes7(bytes7 p0) internal pure {
|
||
| 87 |
_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
|
||
| 88 |
} |
||
| 89 | |||
| 90 |
function logBytes8(bytes8 p0) internal pure {
|
||
| 91 |
_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
|
||
| 92 |
} |
||
| 93 | |||
| 94 |
function logBytes9(bytes9 p0) internal pure {
|
||
| 95 |
_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
|
||
| 96 |
} |
||
| 97 | |||
| 98 |
function logBytes10(bytes10 p0) internal pure {
|
||
| 99 |
_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
|
||
| 100 |
} |
||
| 101 | |||
| 102 |
function logBytes11(bytes11 p0) internal pure {
|
||
| 103 |
_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
|
||
| 104 |
} |
||
| 105 | |||
| 106 |
function logBytes12(bytes12 p0) internal pure {
|
||
| 107 |
_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
|
||
| 108 |
} |
||
| 109 | |||
| 110 |
function logBytes13(bytes13 p0) internal pure {
|
||
| 111 |
_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
|
||
| 112 |
} |
||
| 113 | |||
| 114 |
function logBytes14(bytes14 p0) internal pure {
|
||
| 115 |
_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
|
||
| 116 |
} |
||
| 117 | |||
| 118 |
function logBytes15(bytes15 p0) internal pure {
|
||
| 119 |
_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
|
||
| 120 |
} |
||
| 121 | |||
| 122 |
function logBytes16(bytes16 p0) internal pure {
|
||
| 123 |
_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
|
||
| 124 |
} |
||
| 125 | |||
| 126 |
function logBytes17(bytes17 p0) internal pure {
|
||
| 127 |
_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
|
||
| 128 |
} |
||
| 129 | |||
| 130 |
function logBytes18(bytes18 p0) internal pure {
|
||
| 131 |
_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
|
||
| 132 |
} |
||
| 133 | |||
| 134 |
function logBytes19(bytes19 p0) internal pure {
|
||
| 135 |
_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
|
||
| 136 |
} |
||
| 137 | |||
| 138 |
function logBytes20(bytes20 p0) internal pure {
|
||
| 139 |
_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
|
||
| 140 |
} |
||
| 141 | |||
| 142 |
function logBytes21(bytes21 p0) internal pure {
|
||
| 143 |
_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
|
||
| 144 |
} |
||
| 145 | |||
| 146 |
function logBytes22(bytes22 p0) internal pure {
|
||
| 147 |
_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
|
||
| 148 |
} |
||
| 149 | |||
| 150 |
function logBytes23(bytes23 p0) internal pure {
|
||
| 151 |
_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
|
||
| 152 |
} |
||
| 153 | |||
| 154 |
function logBytes24(bytes24 p0) internal pure {
|
||
| 155 |
_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
|
||
| 156 |
} |
||
| 157 | |||
| 158 |
function logBytes25(bytes25 p0) internal pure {
|
||
| 159 |
_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
|
||
| 160 |
} |
||
| 161 | |||
| 162 |
function logBytes26(bytes26 p0) internal pure {
|
||
| 163 |
_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
|
||
| 164 |
} |
||
| 165 | |||
| 166 |
function logBytes27(bytes27 p0) internal pure {
|
||
| 167 |
_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
|
||
| 168 |
} |
||
| 169 | |||
| 170 |
function logBytes28(bytes28 p0) internal pure {
|
||
| 171 |
_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
|
||
| 172 |
} |
||
| 173 | |||
| 174 |
function logBytes29(bytes29 p0) internal pure {
|
||
| 175 |
_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
|
||
| 176 |
} |
||
| 177 | |||
| 178 |
function logBytes30(bytes30 p0) internal pure {
|
||
| 179 |
_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
|
||
| 180 |
} |
||
| 181 | |||
| 182 |
function logBytes31(bytes31 p0) internal pure {
|
||
| 183 |
_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
|
||
| 184 |
} |
||
| 185 | |||
| 186 |
function logBytes32(bytes32 p0) internal pure {
|
||
| 187 |
_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
|
||
| 188 |
} |
||
| 189 | |||
| 190 |
function log(uint256 p0) internal pure {
|
||
| 191 |
_sendLogPayload(abi.encodeWithSignature("log(uint256)", p0));
|
||
| 192 |
} |
||
| 193 | |||
| 194 |
function log(int256 p0) internal pure {
|
||
| 195 |
_sendLogPayload(abi.encodeWithSignature("log(int256)", p0));
|
||
| 196 |
} |
||
| 197 | |||
| 198 |
function log(string memory p0) internal pure {
|
||
| 199 |
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
|
||
| 200 |
} |
||
| 201 | |||
| 202 |
function log(bool p0) internal pure {
|
||
| 203 |
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
|
||
| 204 |
} |
||
| 205 | |||
| 206 |
function log(address p0) internal pure {
|
||
| 207 |
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
|
||
| 208 |
} |
||
| 209 | |||
| 210 |
function log(uint256 p0, uint256 p1) internal pure {
|
||
| 211 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1));
|
||
| 212 |
} |
||
| 213 | |||
| 214 |
function log(uint256 p0, string memory p1) internal pure {
|
||
| 215 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1));
|
||
| 216 |
} |
||
| 217 | |||
| 218 |
function log(uint256 p0, bool p1) internal pure {
|
||
| 219 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1));
|
||
| 220 |
} |
||
| 221 | |||
| 222 |
function log(uint256 p0, address p1) internal pure {
|
||
| 223 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1));
|
||
| 224 |
} |
||
| 225 | |||
| 226 |
function log(string memory p0, uint256 p1) internal pure {
|
||
| 227 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1));
|
||
| 228 |
} |
||
| 229 | |||
| 230 |
function log(string memory p0, int256 p1) internal pure {
|
||
| 231 |
_sendLogPayload(abi.encodeWithSignature("log(string,int256)", p0, p1));
|
||
| 232 |
} |
||
| 233 | |||
| 234 |
function log(string memory p0, string memory p1) internal pure {
|
||
| 235 |
_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
|
||
| 236 |
} |
||
| 237 | |||
| 238 |
function log(string memory p0, bool p1) internal pure {
|
||
| 239 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
|
||
| 240 |
} |
||
| 241 | |||
| 242 |
function log(string memory p0, address p1) internal pure {
|
||
| 243 |
_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
|
||
| 244 |
} |
||
| 245 | |||
| 246 |
function log(bool p0, uint256 p1) internal pure {
|
||
| 247 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1));
|
||
| 248 |
} |
||
| 249 | |||
| 250 |
function log(bool p0, string memory p1) internal pure {
|
||
| 251 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
|
||
| 252 |
} |
||
| 253 | |||
| 254 |
function log(bool p0, bool p1) internal pure {
|
||
| 255 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
|
||
| 256 |
} |
||
| 257 | |||
| 258 |
function log(bool p0, address p1) internal pure {
|
||
| 259 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
|
||
| 260 |
} |
||
| 261 | |||
| 262 |
function log(address p0, uint256 p1) internal pure {
|
||
| 263 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1));
|
||
| 264 |
} |
||
| 265 | |||
| 266 |
function log(address p0, string memory p1) internal pure {
|
||
| 267 |
_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
|
||
| 268 |
} |
||
| 269 | |||
| 270 |
function log(address p0, bool p1) internal pure {
|
||
| 271 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
|
||
| 272 |
} |
||
| 273 | |||
| 274 |
function log(address p0, address p1) internal pure {
|
||
| 275 |
_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
|
||
| 276 |
} |
||
| 277 | |||
| 278 |
function log(uint256 p0, uint256 p1, uint256 p2) internal pure {
|
||
| 279 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2));
|
||
| 280 |
} |
||
| 281 | |||
| 282 |
function log(uint256 p0, uint256 p1, string memory p2) internal pure {
|
||
| 283 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2));
|
||
| 284 |
} |
||
| 285 | |||
| 286 |
function log(uint256 p0, uint256 p1, bool p2) internal pure {
|
||
| 287 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2));
|
||
| 288 |
} |
||
| 289 | |||
| 290 |
function log(uint256 p0, uint256 p1, address p2) internal pure {
|
||
| 291 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2));
|
||
| 292 |
} |
||
| 293 | |||
| 294 |
function log(uint256 p0, string memory p1, uint256 p2) internal pure {
|
||
| 295 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2));
|
||
| 296 |
} |
||
| 297 | |||
| 298 |
function log(uint256 p0, string memory p1, string memory p2) internal pure {
|
||
| 299 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2));
|
||
| 300 |
} |
||
| 301 | |||
| 302 |
function log(uint256 p0, string memory p1, bool p2) internal pure {
|
||
| 303 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2));
|
||
| 304 |
} |
||
| 305 | |||
| 306 |
function log(uint256 p0, string memory p1, address p2) internal pure {
|
||
| 307 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2));
|
||
| 308 |
} |
||
| 309 | |||
| 310 |
function log(uint256 p0, bool p1, uint256 p2) internal pure {
|
||
| 311 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2));
|
||
| 312 |
} |
||
| 313 | |||
| 314 |
function log(uint256 p0, bool p1, string memory p2) internal pure {
|
||
| 315 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2));
|
||
| 316 |
} |
||
| 317 | |||
| 318 |
function log(uint256 p0, bool p1, bool p2) internal pure {
|
||
| 319 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2));
|
||
| 320 |
} |
||
| 321 | |||
| 322 |
function log(uint256 p0, bool p1, address p2) internal pure {
|
||
| 323 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2));
|
||
| 324 |
} |
||
| 325 | |||
| 326 |
function log(uint256 p0, address p1, uint256 p2) internal pure {
|
||
| 327 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2));
|
||
| 328 |
} |
||
| 329 | |||
| 330 |
function log(uint256 p0, address p1, string memory p2) internal pure {
|
||
| 331 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2));
|
||
| 332 |
} |
||
| 333 | |||
| 334 |
function log(uint256 p0, address p1, bool p2) internal pure {
|
||
| 335 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2));
|
||
| 336 |
} |
||
| 337 | |||
| 338 |
function log(uint256 p0, address p1, address p2) internal pure {
|
||
| 339 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2));
|
||
| 340 |
} |
||
| 341 | |||
| 342 |
function log(string memory p0, uint256 p1, uint256 p2) internal pure {
|
||
| 343 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2));
|
||
| 344 |
} |
||
| 345 | |||
| 346 |
function log(string memory p0, uint256 p1, string memory p2) internal pure {
|
||
| 347 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2));
|
||
| 348 |
} |
||
| 349 | |||
| 350 |
function log(string memory p0, uint256 p1, bool p2) internal pure {
|
||
| 351 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2));
|
||
| 352 |
} |
||
| 353 | |||
| 354 |
function log(string memory p0, uint256 p1, address p2) internal pure {
|
||
| 355 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2));
|
||
| 356 |
} |
||
| 357 | |||
| 358 |
function log(string memory p0, string memory p1, uint256 p2) internal pure {
|
||
| 359 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2));
|
||
| 360 |
} |
||
| 361 | |||
| 362 |
function log(string memory p0, string memory p1, string memory p2) internal pure {
|
||
| 363 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
|
||
| 364 |
} |
||
| 365 | |||
| 366 |
function log(string memory p0, string memory p1, bool p2) internal pure {
|
||
| 367 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
|
||
| 368 |
} |
||
| 369 | |||
| 370 |
function log(string memory p0, string memory p1, address p2) internal pure {
|
||
| 371 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
|
||
| 372 |
} |
||
| 373 | |||
| 374 |
function log(string memory p0, bool p1, uint256 p2) internal pure {
|
||
| 375 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2));
|
||
| 376 |
} |
||
| 377 | |||
| 378 |
function log(string memory p0, bool p1, string memory p2) internal pure {
|
||
| 379 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
|
||
| 380 |
} |
||
| 381 | |||
| 382 |
function log(string memory p0, bool p1, bool p2) internal pure {
|
||
| 383 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
|
||
| 384 |
} |
||
| 385 | |||
| 386 |
function log(string memory p0, bool p1, address p2) internal pure {
|
||
| 387 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
|
||
| 388 |
} |
||
| 389 | |||
| 390 |
function log(string memory p0, address p1, uint256 p2) internal pure {
|
||
| 391 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2));
|
||
| 392 |
} |
||
| 393 | |||
| 394 |
function log(string memory p0, address p1, string memory p2) internal pure {
|
||
| 395 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
|
||
| 396 |
} |
||
| 397 | |||
| 398 |
function log(string memory p0, address p1, bool p2) internal pure {
|
||
| 399 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
|
||
| 400 |
} |
||
| 401 | |||
| 402 |
function log(string memory p0, address p1, address p2) internal pure {
|
||
| 403 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
|
||
| 404 |
} |
||
| 405 | |||
| 406 |
function log(bool p0, uint256 p1, uint256 p2) internal pure {
|
||
| 407 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2));
|
||
| 408 |
} |
||
| 409 | |||
| 410 |
function log(bool p0, uint256 p1, string memory p2) internal pure {
|
||
| 411 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2));
|
||
| 412 |
} |
||
| 413 | |||
| 414 |
function log(bool p0, uint256 p1, bool p2) internal pure {
|
||
| 415 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2));
|
||
| 416 |
} |
||
| 417 | |||
| 418 |
function log(bool p0, uint256 p1, address p2) internal pure {
|
||
| 419 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2));
|
||
| 420 |
} |
||
| 421 | |||
| 422 |
function log(bool p0, string memory p1, uint256 p2) internal pure {
|
||
| 423 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2));
|
||
| 424 |
} |
||
| 425 | |||
| 426 |
function log(bool p0, string memory p1, string memory p2) internal pure {
|
||
| 427 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
|
||
| 428 |
} |
||
| 429 | |||
| 430 |
function log(bool p0, string memory p1, bool p2) internal pure {
|
||
| 431 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
|
||
| 432 |
} |
||
| 433 | |||
| 434 |
function log(bool p0, string memory p1, address p2) internal pure {
|
||
| 435 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
|
||
| 436 |
} |
||
| 437 | |||
| 438 |
function log(bool p0, bool p1, uint256 p2) internal pure {
|
||
| 439 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2));
|
||
| 440 |
} |
||
| 441 | |||
| 442 |
function log(bool p0, bool p1, string memory p2) internal pure {
|
||
| 443 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
|
||
| 444 |
} |
||
| 445 | |||
| 446 |
function log(bool p0, bool p1, bool p2) internal pure {
|
||
| 447 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
|
||
| 448 |
} |
||
| 449 | |||
| 450 |
function log(bool p0, bool p1, address p2) internal pure {
|
||
| 451 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
|
||
| 452 |
} |
||
| 453 | |||
| 454 |
function log(bool p0, address p1, uint256 p2) internal pure {
|
||
| 455 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2));
|
||
| 456 |
} |
||
| 457 | |||
| 458 |
function log(bool p0, address p1, string memory p2) internal pure {
|
||
| 459 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
|
||
| 460 |
} |
||
| 461 | |||
| 462 |
function log(bool p0, address p1, bool p2) internal pure {
|
||
| 463 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
|
||
| 464 |
} |
||
| 465 | |||
| 466 |
function log(bool p0, address p1, address p2) internal pure {
|
||
| 467 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
|
||
| 468 |
} |
||
| 469 | |||
| 470 |
function log(address p0, uint256 p1, uint256 p2) internal pure {
|
||
| 471 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2));
|
||
| 472 |
} |
||
| 473 | |||
| 474 |
function log(address p0, uint256 p1, string memory p2) internal pure {
|
||
| 475 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2));
|
||
| 476 |
} |
||
| 477 | |||
| 478 |
function log(address p0, uint256 p1, bool p2) internal pure {
|
||
| 479 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2));
|
||
| 480 |
} |
||
| 481 | |||
| 482 |
function log(address p0, uint256 p1, address p2) internal pure {
|
||
| 483 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2));
|
||
| 484 |
} |
||
| 485 | |||
| 486 |
function log(address p0, string memory p1, uint256 p2) internal pure {
|
||
| 487 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2));
|
||
| 488 |
} |
||
| 489 | |||
| 490 |
function log(address p0, string memory p1, string memory p2) internal pure {
|
||
| 491 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
|
||
| 492 |
} |
||
| 493 | |||
| 494 |
function log(address p0, string memory p1, bool p2) internal pure {
|
||
| 495 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
|
||
| 496 |
} |
||
| 497 | |||
| 498 |
function log(address p0, string memory p1, address p2) internal pure {
|
||
| 499 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
|
||
| 500 |
} |
||
| 501 | |||
| 502 |
function log(address p0, bool p1, uint256 p2) internal pure {
|
||
| 503 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2));
|
||
| 504 |
} |
||
| 505 | |||
| 506 |
function log(address p0, bool p1, string memory p2) internal pure {
|
||
| 507 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
|
||
| 508 |
} |
||
| 509 | |||
| 510 |
function log(address p0, bool p1, bool p2) internal pure {
|
||
| 511 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
|
||
| 512 |
} |
||
| 513 | |||
| 514 |
function log(address p0, bool p1, address p2) internal pure {
|
||
| 515 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
|
||
| 516 |
} |
||
| 517 | |||
| 518 |
function log(address p0, address p1, uint256 p2) internal pure {
|
||
| 519 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2));
|
||
| 520 |
} |
||
| 521 | |||
| 522 |
function log(address p0, address p1, string memory p2) internal pure {
|
||
| 523 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
|
||
| 524 |
} |
||
| 525 | |||
| 526 |
function log(address p0, address p1, bool p2) internal pure {
|
||
| 527 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
|
||
| 528 |
} |
||
| 529 | |||
| 530 |
function log(address p0, address p1, address p2) internal pure {
|
||
| 531 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
|
||
| 532 |
} |
||
| 533 | |||
| 534 |
function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 535 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3));
|
||
| 536 |
} |
||
| 537 | |||
| 538 |
function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {
|
||
| 539 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3));
|
||
| 540 |
} |
||
| 541 | |||
| 542 |
function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {
|
||
| 543 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3));
|
||
| 544 |
} |
||
| 545 | |||
| 546 |
function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {
|
||
| 547 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3));
|
||
| 548 |
} |
||
| 549 | |||
| 550 |
function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {
|
||
| 551 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3));
|
||
| 552 |
} |
||
| 553 | |||
| 554 |
function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {
|
||
| 555 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3));
|
||
| 556 |
} |
||
| 557 | |||
| 558 |
function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {
|
||
| 559 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3));
|
||
| 560 |
} |
||
| 561 | |||
| 562 |
function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {
|
||
| 563 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3));
|
||
| 564 |
} |
||
| 565 | |||
| 566 |
function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {
|
||
| 567 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3));
|
||
| 568 |
} |
||
| 569 | |||
| 570 |
function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {
|
||
| 571 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3));
|
||
| 572 |
} |
||
| 573 | |||
| 574 |
function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {
|
||
| 575 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3));
|
||
| 576 |
} |
||
| 577 | |||
| 578 |
function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {
|
||
| 579 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3));
|
||
| 580 |
} |
||
| 581 | |||
| 582 |
function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {
|
||
| 583 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3));
|
||
| 584 |
} |
||
| 585 | |||
| 586 |
function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {
|
||
| 587 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3));
|
||
| 588 |
} |
||
| 589 | |||
| 590 |
function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {
|
||
| 591 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3));
|
||
| 592 |
} |
||
| 593 | |||
| 594 |
function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {
|
||
| 595 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3));
|
||
| 596 |
} |
||
| 597 | |||
| 598 |
function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {
|
||
| 599 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3));
|
||
| 600 |
} |
||
| 601 | |||
| 602 |
function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {
|
||
| 603 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3));
|
||
| 604 |
} |
||
| 605 | |||
| 606 |
function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {
|
||
| 607 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3));
|
||
| 608 |
} |
||
| 609 | |||
| 610 |
function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {
|
||
| 611 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3));
|
||
| 612 |
} |
||
| 613 | |||
| 614 |
function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {
|
||
| 615 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3));
|
||
| 616 |
} |
||
| 617 | |||
| 618 |
function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {
|
||
| 619 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3));
|
||
| 620 |
} |
||
| 621 | |||
| 622 |
function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {
|
||
| 623 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3));
|
||
| 624 |
} |
||
| 625 | |||
| 626 |
function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {
|
||
| 627 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3));
|
||
| 628 |
} |
||
| 629 | |||
| 630 |
function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {
|
||
| 631 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3));
|
||
| 632 |
} |
||
| 633 | |||
| 634 |
function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {
|
||
| 635 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3));
|
||
| 636 |
} |
||
| 637 | |||
| 638 |
function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {
|
||
| 639 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3));
|
||
| 640 |
} |
||
| 641 | |||
| 642 |
function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {
|
||
| 643 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3));
|
||
| 644 |
} |
||
| 645 | |||
| 646 |
function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {
|
||
| 647 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3));
|
||
| 648 |
} |
||
| 649 | |||
| 650 |
function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {
|
||
| 651 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3));
|
||
| 652 |
} |
||
| 653 | |||
| 654 |
function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {
|
||
| 655 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3));
|
||
| 656 |
} |
||
| 657 | |||
| 658 |
function log(uint256 p0, string memory p1, address p2, address p3) internal pure {
|
||
| 659 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3));
|
||
| 660 |
} |
||
| 661 | |||
| 662 |
function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {
|
||
| 663 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3));
|
||
| 664 |
} |
||
| 665 | |||
| 666 |
function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {
|
||
| 667 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3));
|
||
| 668 |
} |
||
| 669 | |||
| 670 |
function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {
|
||
| 671 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3));
|
||
| 672 |
} |
||
| 673 | |||
| 674 |
function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {
|
||
| 675 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3));
|
||
| 676 |
} |
||
| 677 | |||
| 678 |
function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {
|
||
| 679 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3));
|
||
| 680 |
} |
||
| 681 | |||
| 682 |
function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {
|
||
| 683 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3));
|
||
| 684 |
} |
||
| 685 | |||
| 686 |
function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {
|
||
| 687 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3));
|
||
| 688 |
} |
||
| 689 | |||
| 690 |
function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {
|
||
| 691 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3));
|
||
| 692 |
} |
||
| 693 | |||
| 694 |
function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {
|
||
| 695 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3));
|
||
| 696 |
} |
||
| 697 | |||
| 698 |
function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {
|
||
| 699 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3));
|
||
| 700 |
} |
||
| 701 | |||
| 702 |
function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {
|
||
| 703 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3));
|
||
| 704 |
} |
||
| 705 | |||
| 706 |
function log(uint256 p0, bool p1, bool p2, address p3) internal pure {
|
||
| 707 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3));
|
||
| 708 |
} |
||
| 709 | |||
| 710 |
function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {
|
||
| 711 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3));
|
||
| 712 |
} |
||
| 713 | |||
| 714 |
function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {
|
||
| 715 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3));
|
||
| 716 |
} |
||
| 717 | |||
| 718 |
function log(uint256 p0, bool p1, address p2, bool p3) internal pure {
|
||
| 719 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3));
|
||
| 720 |
} |
||
| 721 | |||
| 722 |
function log(uint256 p0, bool p1, address p2, address p3) internal pure {
|
||
| 723 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3));
|
||
| 724 |
} |
||
| 725 | |||
| 726 |
function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {
|
||
| 727 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3));
|
||
| 728 |
} |
||
| 729 | |||
| 730 |
function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {
|
||
| 731 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3));
|
||
| 732 |
} |
||
| 733 | |||
| 734 |
function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {
|
||
| 735 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3));
|
||
| 736 |
} |
||
| 737 | |||
| 738 |
function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {
|
||
| 739 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3));
|
||
| 740 |
} |
||
| 741 | |||
| 742 |
function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {
|
||
| 743 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3));
|
||
| 744 |
} |
||
| 745 | |||
| 746 |
function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {
|
||
| 747 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3));
|
||
| 748 |
} |
||
| 749 | |||
| 750 |
function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {
|
||
| 751 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3));
|
||
| 752 |
} |
||
| 753 | |||
| 754 |
function log(uint256 p0, address p1, string memory p2, address p3) internal pure {
|
||
| 755 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3));
|
||
| 756 |
} |
||
| 757 | |||
| 758 |
function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {
|
||
| 759 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3));
|
||
| 760 |
} |
||
| 761 | |||
| 762 |
function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {
|
||
| 763 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3));
|
||
| 764 |
} |
||
| 765 | |||
| 766 |
function log(uint256 p0, address p1, bool p2, bool p3) internal pure {
|
||
| 767 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3));
|
||
| 768 |
} |
||
| 769 | |||
| 770 |
function log(uint256 p0, address p1, bool p2, address p3) internal pure {
|
||
| 771 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3));
|
||
| 772 |
} |
||
| 773 | |||
| 774 |
function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {
|
||
| 775 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3));
|
||
| 776 |
} |
||
| 777 | |||
| 778 |
function log(uint256 p0, address p1, address p2, string memory p3) internal pure {
|
||
| 779 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3));
|
||
| 780 |
} |
||
| 781 | |||
| 782 |
function log(uint256 p0, address p1, address p2, bool p3) internal pure {
|
||
| 783 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3));
|
||
| 784 |
} |
||
| 785 | |||
| 786 |
function log(uint256 p0, address p1, address p2, address p3) internal pure {
|
||
| 787 |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3));
|
||
| 788 |
} |
||
| 789 | |||
| 790 |
function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 791 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3));
|
||
| 792 |
} |
||
| 793 | |||
| 794 |
function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {
|
||
| 795 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3));
|
||
| 796 |
} |
||
| 797 | |||
| 798 |
function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {
|
||
| 799 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3));
|
||
| 800 |
} |
||
| 801 | |||
| 802 |
function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {
|
||
| 803 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3));
|
||
| 804 |
} |
||
| 805 | |||
| 806 |
function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {
|
||
| 807 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3));
|
||
| 808 |
} |
||
| 809 | |||
| 810 |
function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {
|
||
| 811 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3));
|
||
| 812 |
} |
||
| 813 | |||
| 814 |
function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {
|
||
| 815 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3));
|
||
| 816 |
} |
||
| 817 | |||
| 818 |
function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {
|
||
| 819 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3));
|
||
| 820 |
} |
||
| 821 | |||
| 822 |
function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {
|
||
| 823 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3));
|
||
| 824 |
} |
||
| 825 | |||
| 826 |
function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {
|
||
| 827 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3));
|
||
| 828 |
} |
||
| 829 | |||
| 830 |
function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {
|
||
| 831 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3));
|
||
| 832 |
} |
||
| 833 | |||
| 834 |
function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {
|
||
| 835 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3));
|
||
| 836 |
} |
||
| 837 | |||
| 838 |
function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {
|
||
| 839 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3));
|
||
| 840 |
} |
||
| 841 | |||
| 842 |
function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {
|
||
| 843 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3));
|
||
| 844 |
} |
||
| 845 | |||
| 846 |
function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {
|
||
| 847 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3));
|
||
| 848 |
} |
||
| 849 | |||
| 850 |
function log(string memory p0, uint256 p1, address p2, address p3) internal pure {
|
||
| 851 |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3));
|
||
| 852 |
} |
||
| 853 | |||
| 854 |
function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {
|
||
| 855 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3));
|
||
| 856 |
} |
||
| 857 | |||
| 858 |
function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {
|
||
| 859 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3));
|
||
| 860 |
} |
||
| 861 | |||
| 862 |
function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {
|
||
| 863 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3));
|
||
| 864 |
} |
||
| 865 | |||
| 866 |
function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {
|
||
| 867 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3));
|
||
| 868 |
} |
||
| 869 | |||
| 870 |
function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {
|
||
| 871 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3));
|
||
| 872 |
} |
||
| 873 | |||
| 874 |
function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {
|
||
| 875 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
|
||
| 876 |
} |
||
| 877 | |||
| 878 |
function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {
|
||
| 879 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
|
||
| 880 |
} |
||
| 881 | |||
| 882 |
function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {
|
||
| 883 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
|
||
| 884 |
} |
||
| 885 | |||
| 886 |
function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {
|
||
| 887 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3));
|
||
| 888 |
} |
||
| 889 | |||
| 890 |
function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {
|
||
| 891 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
|
||
| 892 |
} |
||
| 893 | |||
| 894 |
function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {
|
||
| 895 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
|
||
| 896 |
} |
||
| 897 | |||
| 898 |
function log(string memory p0, string memory p1, bool p2, address p3) internal pure {
|
||
| 899 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
|
||
| 900 |
} |
||
| 901 | |||
| 902 |
function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {
|
||
| 903 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3));
|
||
| 904 |
} |
||
| 905 | |||
| 906 |
function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {
|
||
| 907 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
|
||
| 908 |
} |
||
| 909 | |||
| 910 |
function log(string memory p0, string memory p1, address p2, bool p3) internal pure {
|
||
| 911 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
|
||
| 912 |
} |
||
| 913 | |||
| 914 |
function log(string memory p0, string memory p1, address p2, address p3) internal pure {
|
||
| 915 |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
|
||
| 916 |
} |
||
| 917 | |||
| 918 |
function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {
|
||
| 919 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3));
|
||
| 920 |
} |
||
| 921 | |||
| 922 |
function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {
|
||
| 923 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3));
|
||
| 924 |
} |
||
| 925 | |||
| 926 |
function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {
|
||
| 927 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3));
|
||
| 928 |
} |
||
| 929 | |||
| 930 |
function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {
|
||
| 931 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3));
|
||
| 932 |
} |
||
| 933 | |||
| 934 |
function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {
|
||
| 935 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3));
|
||
| 936 |
} |
||
| 937 | |||
| 938 |
function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {
|
||
| 939 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
|
||
| 940 |
} |
||
| 941 | |||
| 942 |
function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {
|
||
| 943 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
|
||
| 944 |
} |
||
| 945 | |||
| 946 |
function log(string memory p0, bool p1, string memory p2, address p3) internal pure {
|
||
| 947 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
|
||
| 948 |
} |
||
| 949 | |||
| 950 |
function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {
|
||
| 951 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3));
|
||
| 952 |
} |
||
| 953 | |||
| 954 |
function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {
|
||
| 955 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
|
||
| 956 |
} |
||
| 957 | |||
| 958 |
function log(string memory p0, bool p1, bool p2, bool p3) internal pure {
|
||
| 959 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
|
||
| 960 |
} |
||
| 961 | |||
| 962 |
function log(string memory p0, bool p1, bool p2, address p3) internal pure {
|
||
| 963 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
|
||
| 964 |
} |
||
| 965 | |||
| 966 |
function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {
|
||
| 967 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3));
|
||
| 968 |
} |
||
| 969 | |||
| 970 |
function log(string memory p0, bool p1, address p2, string memory p3) internal pure {
|
||
| 971 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
|
||
| 972 |
} |
||
| 973 | |||
| 974 |
function log(string memory p0, bool p1, address p2, bool p3) internal pure {
|
||
| 975 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
|
||
| 976 |
} |
||
| 977 | |||
| 978 |
function log(string memory p0, bool p1, address p2, address p3) internal pure {
|
||
| 979 |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
|
||
| 980 |
} |
||
| 981 | |||
| 982 |
function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {
|
||
| 983 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3));
|
||
| 984 |
} |
||
| 985 | |||
| 986 |
function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {
|
||
| 987 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3));
|
||
| 988 |
} |
||
| 989 | |||
| 990 |
function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {
|
||
| 991 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3));
|
||
| 992 |
} |
||
| 993 | |||
| 994 |
function log(string memory p0, address p1, uint256 p2, address p3) internal pure {
|
||
| 995 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3));
|
||
| 996 |
} |
||
| 997 | |||
| 998 |
function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {
|
||
| 999 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3));
|
||
| 1000 |
} |
||
| 1001 | |||
| 1002 |
function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {
|
||
| 1003 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
|
||
| 1004 |
} |
||
| 1005 | |||
| 1006 |
function log(string memory p0, address p1, string memory p2, bool p3) internal pure {
|
||
| 1007 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
|
||
| 1008 |
} |
||
| 1009 | |||
| 1010 |
function log(string memory p0, address p1, string memory p2, address p3) internal pure {
|
||
| 1011 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
|
||
| 1012 |
} |
||
| 1013 | |||
| 1014 |
function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {
|
||
| 1015 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3));
|
||
| 1016 |
} |
||
| 1017 | |||
| 1018 |
function log(string memory p0, address p1, bool p2, string memory p3) internal pure {
|
||
| 1019 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
|
||
| 1020 |
} |
||
| 1021 | |||
| 1022 |
function log(string memory p0, address p1, bool p2, bool p3) internal pure {
|
||
| 1023 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
|
||
| 1024 |
} |
||
| 1025 | |||
| 1026 |
function log(string memory p0, address p1, bool p2, address p3) internal pure {
|
||
| 1027 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
|
||
| 1028 |
} |
||
| 1029 | |||
| 1030 |
function log(string memory p0, address p1, address p2, uint256 p3) internal pure {
|
||
| 1031 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3));
|
||
| 1032 |
} |
||
| 1033 | |||
| 1034 |
function log(string memory p0, address p1, address p2, string memory p3) internal pure {
|
||
| 1035 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
|
||
| 1036 |
} |
||
| 1037 | |||
| 1038 |
function log(string memory p0, address p1, address p2, bool p3) internal pure {
|
||
| 1039 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
|
||
| 1040 |
} |
||
| 1041 | |||
| 1042 |
function log(string memory p0, address p1, address p2, address p3) internal pure {
|
||
| 1043 |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
|
||
| 1044 |
} |
||
| 1045 | |||
| 1046 |
function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 1047 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3));
|
||
| 1048 |
} |
||
| 1049 | |||
| 1050 |
function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {
|
||
| 1051 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3));
|
||
| 1052 |
} |
||
| 1053 | |||
| 1054 |
function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {
|
||
| 1055 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3));
|
||
| 1056 |
} |
||
| 1057 | |||
| 1058 |
function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {
|
||
| 1059 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3));
|
||
| 1060 |
} |
||
| 1061 | |||
| 1062 |
function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {
|
||
| 1063 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3));
|
||
| 1064 |
} |
||
| 1065 | |||
| 1066 |
function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {
|
||
| 1067 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3));
|
||
| 1068 |
} |
||
| 1069 | |||
| 1070 |
function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {
|
||
| 1071 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3));
|
||
| 1072 |
} |
||
| 1073 | |||
| 1074 |
function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {
|
||
| 1075 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3));
|
||
| 1076 |
} |
||
| 1077 | |||
| 1078 |
function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {
|
||
| 1079 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3));
|
||
| 1080 |
} |
||
| 1081 | |||
| 1082 |
function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {
|
||
| 1083 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3));
|
||
| 1084 |
} |
||
| 1085 | |||
| 1086 |
function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {
|
||
| 1087 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3));
|
||
| 1088 |
} |
||
| 1089 | |||
| 1090 |
function log(bool p0, uint256 p1, bool p2, address p3) internal pure {
|
||
| 1091 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3));
|
||
| 1092 |
} |
||
| 1093 | |||
| 1094 |
function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {
|
||
| 1095 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3));
|
||
| 1096 |
} |
||
| 1097 | |||
| 1098 |
function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {
|
||
| 1099 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3));
|
||
| 1100 |
} |
||
| 1101 | |||
| 1102 |
function log(bool p0, uint256 p1, address p2, bool p3) internal pure {
|
||
| 1103 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3));
|
||
| 1104 |
} |
||
| 1105 | |||
| 1106 |
function log(bool p0, uint256 p1, address p2, address p3) internal pure {
|
||
| 1107 |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3));
|
||
| 1108 |
} |
||
| 1109 | |||
| 1110 |
function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {
|
||
| 1111 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3));
|
||
| 1112 |
} |
||
| 1113 | |||
| 1114 |
function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {
|
||
| 1115 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3));
|
||
| 1116 |
} |
||
| 1117 | |||
| 1118 |
function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {
|
||
| 1119 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3));
|
||
| 1120 |
} |
||
| 1121 | |||
| 1122 |
function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {
|
||
| 1123 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3));
|
||
| 1124 |
} |
||
| 1125 | |||
| 1126 |
function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {
|
||
| 1127 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3));
|
||
| 1128 |
} |
||
| 1129 | |||
| 1130 |
function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {
|
||
| 1131 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
|
||
| 1132 |
} |
||
| 1133 | |||
| 1134 |
function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {
|
||
| 1135 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
|
||
| 1136 |
} |
||
| 1137 | |||
| 1138 |
function log(bool p0, string memory p1, string memory p2, address p3) internal pure {
|
||
| 1139 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
|
||
| 1140 |
} |
||
| 1141 | |||
| 1142 |
function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {
|
||
| 1143 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3));
|
||
| 1144 |
} |
||
| 1145 | |||
| 1146 |
function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {
|
||
| 1147 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
|
||
| 1148 |
} |
||
| 1149 | |||
| 1150 |
function log(bool p0, string memory p1, bool p2, bool p3) internal pure {
|
||
| 1151 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
|
||
| 1152 |
} |
||
| 1153 | |||
| 1154 |
function log(bool p0, string memory p1, bool p2, address p3) internal pure {
|
||
| 1155 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
|
||
| 1156 |
} |
||
| 1157 | |||
| 1158 |
function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {
|
||
| 1159 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3));
|
||
| 1160 |
} |
||
| 1161 | |||
| 1162 |
function log(bool p0, string memory p1, address p2, string memory p3) internal pure {
|
||
| 1163 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
|
||
| 1164 |
} |
||
| 1165 | |||
| 1166 |
function log(bool p0, string memory p1, address p2, bool p3) internal pure {
|
||
| 1167 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
|
||
| 1168 |
} |
||
| 1169 | |||
| 1170 |
function log(bool p0, string memory p1, address p2, address p3) internal pure {
|
||
| 1171 |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
|
||
| 1172 |
} |
||
| 1173 | |||
| 1174 |
function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {
|
||
| 1175 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3));
|
||
| 1176 |
} |
||
| 1177 | |||
| 1178 |
function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {
|
||
| 1179 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3));
|
||
| 1180 |
} |
||
| 1181 | |||
| 1182 |
function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {
|
||
| 1183 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3));
|
||
| 1184 |
} |
||
| 1185 | |||
| 1186 |
function log(bool p0, bool p1, uint256 p2, address p3) internal pure {
|
||
| 1187 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3));
|
||
| 1188 |
} |
||
| 1189 | |||
| 1190 |
function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {
|
||
| 1191 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3));
|
||
| 1192 |
} |
||
| 1193 | |||
| 1194 |
function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {
|
||
| 1195 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
|
||
| 1196 |
} |
||
| 1197 | |||
| 1198 |
function log(bool p0, bool p1, string memory p2, bool p3) internal pure {
|
||
| 1199 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
|
||
| 1200 |
} |
||
| 1201 | |||
| 1202 |
function log(bool p0, bool p1, string memory p2, address p3) internal pure {
|
||
| 1203 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
|
||
| 1204 |
} |
||
| 1205 | |||
| 1206 |
function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {
|
||
| 1207 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3));
|
||
| 1208 |
} |
||
| 1209 | |||
| 1210 |
function log(bool p0, bool p1, bool p2, string memory p3) internal pure {
|
||
| 1211 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
|
||
| 1212 |
} |
||
| 1213 | |||
| 1214 |
function log(bool p0, bool p1, bool p2, bool p3) internal pure {
|
||
| 1215 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
|
||
| 1216 |
} |
||
| 1217 | |||
| 1218 |
function log(bool p0, bool p1, bool p2, address p3) internal pure {
|
||
| 1219 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
|
||
| 1220 |
} |
||
| 1221 | |||
| 1222 |
function log(bool p0, bool p1, address p2, uint256 p3) internal pure {
|
||
| 1223 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3));
|
||
| 1224 |
} |
||
| 1225 | |||
| 1226 |
function log(bool p0, bool p1, address p2, string memory p3) internal pure {
|
||
| 1227 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
|
||
| 1228 |
} |
||
| 1229 | |||
| 1230 |
function log(bool p0, bool p1, address p2, bool p3) internal pure {
|
||
| 1231 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
|
||
| 1232 |
} |
||
| 1233 | |||
| 1234 |
function log(bool p0, bool p1, address p2, address p3) internal pure {
|
||
| 1235 |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
|
||
| 1236 |
} |
||
| 1237 | |||
| 1238 |
function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {
|
||
| 1239 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3));
|
||
| 1240 |
} |
||
| 1241 | |||
| 1242 |
function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {
|
||
| 1243 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3));
|
||
| 1244 |
} |
||
| 1245 | |||
| 1246 |
function log(bool p0, address p1, uint256 p2, bool p3) internal pure {
|
||
| 1247 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3));
|
||
| 1248 |
} |
||
| 1249 | |||
| 1250 |
function log(bool p0, address p1, uint256 p2, address p3) internal pure {
|
||
| 1251 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3));
|
||
| 1252 |
} |
||
| 1253 | |||
| 1254 |
function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {
|
||
| 1255 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3));
|
||
| 1256 |
} |
||
| 1257 | |||
| 1258 |
function log(bool p0, address p1, string memory p2, string memory p3) internal pure {
|
||
| 1259 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
|
||
| 1260 |
} |
||
| 1261 | |||
| 1262 |
function log(bool p0, address p1, string memory p2, bool p3) internal pure {
|
||
| 1263 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
|
||
| 1264 |
} |
||
| 1265 | |||
| 1266 |
function log(bool p0, address p1, string memory p2, address p3) internal pure {
|
||
| 1267 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
|
||
| 1268 |
} |
||
| 1269 | |||
| 1270 |
function log(bool p0, address p1, bool p2, uint256 p3) internal pure {
|
||
| 1271 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3));
|
||
| 1272 |
} |
||
| 1273 | |||
| 1274 |
function log(bool p0, address p1, bool p2, string memory p3) internal pure {
|
||
| 1275 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
|
||
| 1276 |
} |
||
| 1277 | |||
| 1278 |
function log(bool p0, address p1, bool p2, bool p3) internal pure {
|
||
| 1279 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
|
||
| 1280 |
} |
||
| 1281 | |||
| 1282 |
function log(bool p0, address p1, bool p2, address p3) internal pure {
|
||
| 1283 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
|
||
| 1284 |
} |
||
| 1285 | |||
| 1286 |
function log(bool p0, address p1, address p2, uint256 p3) internal pure {
|
||
| 1287 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3));
|
||
| 1288 |
} |
||
| 1289 | |||
| 1290 |
function log(bool p0, address p1, address p2, string memory p3) internal pure {
|
||
| 1291 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
|
||
| 1292 |
} |
||
| 1293 | |||
| 1294 |
function log(bool p0, address p1, address p2, bool p3) internal pure {
|
||
| 1295 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
|
||
| 1296 |
} |
||
| 1297 | |||
| 1298 |
function log(bool p0, address p1, address p2, address p3) internal pure {
|
||
| 1299 |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
|
||
| 1300 |
} |
||
| 1301 | |||
| 1302 |
function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 1303 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3));
|
||
| 1304 |
} |
||
| 1305 | |||
| 1306 |
function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {
|
||
| 1307 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3));
|
||
| 1308 |
} |
||
| 1309 | |||
| 1310 |
function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {
|
||
| 1311 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3));
|
||
| 1312 |
} |
||
| 1313 | |||
| 1314 |
function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {
|
||
| 1315 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3));
|
||
| 1316 |
} |
||
| 1317 | |||
| 1318 |
function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {
|
||
| 1319 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3));
|
||
| 1320 |
} |
||
| 1321 | |||
| 1322 |
function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {
|
||
| 1323 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3));
|
||
| 1324 |
} |
||
| 1325 | |||
| 1326 |
function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {
|
||
| 1327 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3));
|
||
| 1328 |
} |
||
| 1329 | |||
| 1330 |
function log(address p0, uint256 p1, string memory p2, address p3) internal pure {
|
||
| 1331 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3));
|
||
| 1332 |
} |
||
| 1333 | |||
| 1334 |
function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {
|
||
| 1335 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3));
|
||
| 1336 |
} |
||
| 1337 | |||
| 1338 |
function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {
|
||
| 1339 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3));
|
||
| 1340 |
} |
||
| 1341 | |||
| 1342 |
function log(address p0, uint256 p1, bool p2, bool p3) internal pure {
|
||
| 1343 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3));
|
||
| 1344 |
} |
||
| 1345 | |||
| 1346 |
function log(address p0, uint256 p1, bool p2, address p3) internal pure {
|
||
| 1347 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3));
|
||
| 1348 |
} |
||
| 1349 | |||
| 1350 |
function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {
|
||
| 1351 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3));
|
||
| 1352 |
} |
||
| 1353 | |||
| 1354 |
function log(address p0, uint256 p1, address p2, string memory p3) internal pure {
|
||
| 1355 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3));
|
||
| 1356 |
} |
||
| 1357 | |||
| 1358 |
function log(address p0, uint256 p1, address p2, bool p3) internal pure {
|
||
| 1359 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3));
|
||
| 1360 |
} |
||
| 1361 | |||
| 1362 |
function log(address p0, uint256 p1, address p2, address p3) internal pure {
|
||
| 1363 |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3));
|
||
| 1364 |
} |
||
| 1365 | |||
| 1366 |
function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {
|
||
| 1367 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3));
|
||
| 1368 |
} |
||
| 1369 | |||
| 1370 |
function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {
|
||
| 1371 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3));
|
||
| 1372 |
} |
||
| 1373 | |||
| 1374 |
function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {
|
||
| 1375 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3));
|
||
| 1376 |
} |
||
| 1377 | |||
| 1378 |
function log(address p0, string memory p1, uint256 p2, address p3) internal pure {
|
||
| 1379 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3));
|
||
| 1380 |
} |
||
| 1381 | |||
| 1382 |
function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {
|
||
| 1383 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3));
|
||
| 1384 |
} |
||
| 1385 | |||
| 1386 |
function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {
|
||
| 1387 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
|
||
| 1388 |
} |
||
| 1389 | |||
| 1390 |
function log(address p0, string memory p1, string memory p2, bool p3) internal pure {
|
||
| 1391 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
|
||
| 1392 |
} |
||
| 1393 | |||
| 1394 |
function log(address p0, string memory p1, string memory p2, address p3) internal pure {
|
||
| 1395 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
|
||
| 1396 |
} |
||
| 1397 | |||
| 1398 |
function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {
|
||
| 1399 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3));
|
||
| 1400 |
} |
||
| 1401 | |||
| 1402 |
function log(address p0, string memory p1, bool p2, string memory p3) internal pure {
|
||
| 1403 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
|
||
| 1404 |
} |
||
| 1405 | |||
| 1406 |
function log(address p0, string memory p1, bool p2, bool p3) internal pure {
|
||
| 1407 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
|
||
| 1408 |
} |
||
| 1409 | |||
| 1410 |
function log(address p0, string memory p1, bool p2, address p3) internal pure {
|
||
| 1411 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
|
||
| 1412 |
} |
||
| 1413 | |||
| 1414 |
function log(address p0, string memory p1, address p2, uint256 p3) internal pure {
|
||
| 1415 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3));
|
||
| 1416 |
} |
||
| 1417 | |||
| 1418 |
function log(address p0, string memory p1, address p2, string memory p3) internal pure {
|
||
| 1419 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
|
||
| 1420 |
} |
||
| 1421 | |||
| 1422 |
function log(address p0, string memory p1, address p2, bool p3) internal pure {
|
||
| 1423 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
|
||
| 1424 |
} |
||
| 1425 | |||
| 1426 |
function log(address p0, string memory p1, address p2, address p3) internal pure {
|
||
| 1427 |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
|
||
| 1428 |
} |
||
| 1429 | |||
| 1430 |
function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {
|
||
| 1431 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3));
|
||
| 1432 |
} |
||
| 1433 | |||
| 1434 |
function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {
|
||
| 1435 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3));
|
||
| 1436 |
} |
||
| 1437 | |||
| 1438 |
function log(address p0, bool p1, uint256 p2, bool p3) internal pure {
|
||
| 1439 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3));
|
||
| 1440 |
} |
||
| 1441 | |||
| 1442 |
function log(address p0, bool p1, uint256 p2, address p3) internal pure {
|
||
| 1443 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3));
|
||
| 1444 |
} |
||
| 1445 | |||
| 1446 |
function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {
|
||
| 1447 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3));
|
||
| 1448 |
} |
||
| 1449 | |||
| 1450 |
function log(address p0, bool p1, string memory p2, string memory p3) internal pure {
|
||
| 1451 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
|
||
| 1452 |
} |
||
| 1453 | |||
| 1454 |
function log(address p0, bool p1, string memory p2, bool p3) internal pure {
|
||
| 1455 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
|
||
| 1456 |
} |
||
| 1457 | |||
| 1458 |
function log(address p0, bool p1, string memory p2, address p3) internal pure {
|
||
| 1459 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
|
||
| 1460 |
} |
||
| 1461 | |||
| 1462 |
function log(address p0, bool p1, bool p2, uint256 p3) internal pure {
|
||
| 1463 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3));
|
||
| 1464 |
} |
||
| 1465 | |||
| 1466 |
function log(address p0, bool p1, bool p2, string memory p3) internal pure {
|
||
| 1467 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
|
||
| 1468 |
} |
||
| 1469 | |||
| 1470 |
function log(address p0, bool p1, bool p2, bool p3) internal pure {
|
||
| 1471 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
|
||
| 1472 |
} |
||
| 1473 | |||
| 1474 |
function log(address p0, bool p1, bool p2, address p3) internal pure {
|
||
| 1475 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
|
||
| 1476 |
} |
||
| 1477 | |||
| 1478 |
function log(address p0, bool p1, address p2, uint256 p3) internal pure {
|
||
| 1479 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3));
|
||
| 1480 |
} |
||
| 1481 | |||
| 1482 |
function log(address p0, bool p1, address p2, string memory p3) internal pure {
|
||
| 1483 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
|
||
| 1484 |
} |
||
| 1485 | |||
| 1486 |
function log(address p0, bool p1, address p2, bool p3) internal pure {
|
||
| 1487 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
|
||
| 1488 |
} |
||
| 1489 | |||
| 1490 |
function log(address p0, bool p1, address p2, address p3) internal pure {
|
||
| 1491 |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
|
||
| 1492 |
} |
||
| 1493 | |||
| 1494 |
function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {
|
||
| 1495 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3));
|
||
| 1496 |
} |
||
| 1497 | |||
| 1498 |
function log(address p0, address p1, uint256 p2, string memory p3) internal pure {
|
||
| 1499 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3));
|
||
| 1500 |
} |
||
| 1501 | |||
| 1502 |
function log(address p0, address p1, uint256 p2, bool p3) internal pure {
|
||
| 1503 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3));
|
||
| 1504 |
} |
||
| 1505 | |||
| 1506 |
function log(address p0, address p1, uint256 p2, address p3) internal pure {
|
||
| 1507 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3));
|
||
| 1508 |
} |
||
| 1509 | |||
| 1510 |
function log(address p0, address p1, string memory p2, uint256 p3) internal pure {
|
||
| 1511 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3));
|
||
| 1512 |
} |
||
| 1513 | |||
| 1514 |
function log(address p0, address p1, string memory p2, string memory p3) internal pure {
|
||
| 1515 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
|
||
| 1516 |
} |
||
| 1517 | |||
| 1518 |
function log(address p0, address p1, string memory p2, bool p3) internal pure {
|
||
| 1519 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
|
||
| 1520 |
} |
||
| 1521 | |||
| 1522 |
function log(address p0, address p1, string memory p2, address p3) internal pure {
|
||
| 1523 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
|
||
| 1524 |
} |
||
| 1525 | |||
| 1526 |
function log(address p0, address p1, bool p2, uint256 p3) internal pure {
|
||
| 1527 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3));
|
||
| 1528 |
} |
||
| 1529 | |||
| 1530 |
function log(address p0, address p1, bool p2, string memory p3) internal pure {
|
||
| 1531 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
|
||
| 1532 |
} |
||
| 1533 | |||
| 1534 |
function log(address p0, address p1, bool p2, bool p3) internal pure {
|
||
| 1535 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
|
||
| 1536 |
} |
||
| 1537 | |||
| 1538 |
function log(address p0, address p1, bool p2, address p3) internal pure {
|
||
| 1539 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
|
||
| 1540 |
} |
||
| 1541 | |||
| 1542 |
function log(address p0, address p1, address p2, uint256 p3) internal pure {
|
||
| 1543 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3));
|
||
| 1544 |
} |
||
| 1545 | |||
| 1546 |
function log(address p0, address p1, address p2, string memory p3) internal pure {
|
||
| 1547 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
|
||
| 1548 |
} |
||
| 1549 | |||
| 1550 |
function log(address p0, address p1, address p2, bool p3) internal pure {
|
||
| 1551 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
|
||
| 1552 |
} |
||
| 1553 | |||
| 1554 |
function log(address p0, address p1, address p2, address p3) internal pure {
|
||
| 1555 |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
|
||
| 1556 |
} |
||
| 1557 | |||
| 1558 |
} |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2; |
||
| 3 | |||
| 4 |
interface IERC165 {
|
||
| 5 |
/// @notice Query if a contract implements an interface |
||
| 6 |
/// @param interfaceID The interface identifier, as specified in ERC-165 |
||
| 7 |
/// @dev Interface identification is specified in ERC-165. This function |
||
| 8 |
/// uses less than 30,000 gas. |
||
| 9 |
/// @return `true` if the contract implements `interfaceID` and |
||
| 10 |
/// `interfaceID` is not 0xffffffff, `false` otherwise |
||
| 11 |
function supportsInterface(bytes4 interfaceID) external view returns (bool); |
||
| 12 |
} |
||
| 13 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2; |
||
| 3 | |||
| 4 |
/// @dev Interface of the ERC20 standard as defined in the EIP. |
||
| 5 |
/// @dev This includes the optional name, symbol, and decimals metadata. |
||
| 6 |
interface IERC20 {
|
||
| 7 |
/// @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`). |
||
| 8 |
event Transfer(address indexed from, address indexed to, uint256 value); |
||
| 9 | |||
| 10 |
/// @dev Emitted when the allowance of a `spender` for an `owner` is set, where `value` |
||
| 11 |
/// is the new allowance. |
||
| 12 |
event Approval(address indexed owner, address indexed spender, uint256 value); |
||
| 13 | |||
| 14 |
/// @notice Returns the amount of tokens in existence. |
||
| 15 |
function totalSupply() external view returns (uint256); |
||
| 16 | |||
| 17 |
/// @notice Returns the amount of tokens owned by `account`. |
||
| 18 |
function balanceOf(address account) external view returns (uint256); |
||
| 19 | |||
| 20 |
/// @notice Moves `amount` tokens from the caller's account to `to`. |
||
| 21 |
function transfer(address to, uint256 amount) external returns (bool); |
||
| 22 | |||
| 23 |
/// @notice Returns the remaining number of tokens that `spender` is allowed |
||
| 24 |
/// to spend on behalf of `owner` |
||
| 25 |
function allowance(address owner, address spender) external view returns (uint256); |
||
| 26 | |||
| 27 |
/// @notice Sets `amount` as the allowance of `spender` over the caller's tokens. |
||
| 28 |
/// @dev Be aware of front-running risks: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 |
||
| 29 |
function approve(address spender, uint256 amount) external returns (bool); |
||
| 30 | |||
| 31 |
/// @notice Moves `amount` tokens from `from` to `to` using the allowance mechanism. |
||
| 32 |
/// `amount` is then deducted from the caller's allowance. |
||
| 33 |
function transferFrom(address from, address to, uint256 amount) external returns (bool); |
||
| 34 | |||
| 35 |
/// @notice Returns the name of the token. |
||
| 36 |
function name() external view returns (string memory); |
||
| 37 | |||
| 38 |
/// @notice Returns the symbol of the token. |
||
| 39 |
function symbol() external view returns (string memory); |
||
| 40 | |||
| 41 |
/// @notice Returns the decimals places of the token. |
||
| 42 |
function decimals() external view returns (uint8); |
||
| 43 |
} |
||
| 44 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2; |
||
| 3 | |||
| 4 |
import "./IERC165.sol"; |
||
| 5 | |||
| 6 |
/// @title ERC-721 Non-Fungible Token Standard |
||
| 7 |
/// @dev See https://eips.ethereum.org/EIPS/eip-721 |
||
| 8 |
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd. |
||
| 9 |
interface IERC721 is IERC165 {
|
||
| 10 |
/// @dev This emits when ownership of any NFT changes by any mechanism. |
||
| 11 |
/// This event emits when NFTs are created (`from` == 0) and destroyed |
||
| 12 |
/// (`to` == 0). Exception: during contract creation, any number of NFTs |
||
| 13 |
/// may be created and assigned without emitting Transfer. At the time of |
||
| 14 |
/// any transfer, the approved address for that NFT (if any) is reset to none. |
||
| 15 |
event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); |
||
| 16 | |||
| 17 |
/// @dev This emits when the approved address for an NFT is changed or |
||
| 18 |
/// reaffirmed. The zero address indicates there is no approved address. |
||
| 19 |
/// When a Transfer event emits, this also indicates that the approved |
||
| 20 |
/// address for that NFT (if any) is reset to none. |
||
| 21 |
event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); |
||
| 22 | |||
| 23 |
/// @dev This emits when an operator is enabled or disabled for an owner. |
||
| 24 |
/// The operator can manage all NFTs of the owner. |
||
| 25 |
event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); |
||
| 26 | |||
| 27 |
/// @notice Count all NFTs assigned to an owner |
||
| 28 |
/// @dev NFTs assigned to the zero address are considered invalid, and this |
||
| 29 |
/// function throws for queries about the zero address. |
||
| 30 |
/// @param _owner An address for whom to query the balance |
||
| 31 |
/// @return The number of NFTs owned by `_owner`, possibly zero |
||
| 32 |
function balanceOf(address _owner) external view returns (uint256); |
||
| 33 | |||
| 34 |
/// @notice Find the owner of an NFT |
||
| 35 |
/// @dev NFTs assigned to zero address are considered invalid, and queries |
||
| 36 |
/// about them do throw. |
||
| 37 |
/// @param _tokenId The identifier for an NFT |
||
| 38 |
/// @return The address of the owner of the NFT |
||
| 39 |
function ownerOf(uint256 _tokenId) external view returns (address); |
||
| 40 | |||
| 41 |
/// @notice Transfers the ownership of an NFT from one address to another address |
||
| 42 |
/// @dev Throws unless `msg.sender` is the current owner, an authorized |
||
| 43 |
/// operator, or the approved address for this NFT. Throws if `_from` is |
||
| 44 |
/// not the current owner. Throws if `_to` is the zero address. Throws if |
||
| 45 |
/// `_tokenId` is not a valid NFT. When transfer is complete, this function |
||
| 46 |
/// checks if `_to` is a smart contract (code size > 0). If so, it calls |
||
| 47 |
/// `onERC721Received` on `_to` and throws if the return value is not |
||
| 48 |
/// `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`.
|
||
| 49 |
/// @param _from The current owner of the NFT |
||
| 50 |
/// @param _to The new owner |
||
| 51 |
/// @param _tokenId The NFT to transfer |
||
| 52 |
/// @param data Additional data with no specified format, sent in call to `_to` |
||
| 53 |
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable; |
||
| 54 | |||
| 55 |
/// @notice Transfers the ownership of an NFT from one address to another address |
||
| 56 |
/// @dev This works identically to the other function with an extra data parameter, |
||
| 57 |
/// except this function just sets data to "". |
||
| 58 |
/// @param _from The current owner of the NFT |
||
| 59 |
/// @param _to The new owner |
||
| 60 |
/// @param _tokenId The NFT to transfer |
||
| 61 |
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; |
||
| 62 | |||
| 63 |
/// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE |
||
| 64 |
/// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE |
||
| 65 |
/// THEY MAY BE PERMANENTLY LOST |
||
| 66 |
/// @dev Throws unless `msg.sender` is the current owner, an authorized |
||
| 67 |
/// operator, or the approved address for this NFT. Throws if `_from` is |
||
| 68 |
/// not the current owner. Throws if `_to` is the zero address. Throws if |
||
| 69 |
/// `_tokenId` is not a valid NFT. |
||
| 70 |
/// @param _from The current owner of the NFT |
||
| 71 |
/// @param _to The new owner |
||
| 72 |
/// @param _tokenId The NFT to transfer |
||
| 73 |
function transferFrom(address _from, address _to, uint256 _tokenId) external payable; |
||
| 74 | |||
| 75 |
/// @notice Change or reaffirm the approved address for an NFT |
||
| 76 |
/// @dev The zero address indicates there is no approved address. |
||
| 77 |
/// Throws unless `msg.sender` is the current NFT owner, or an authorized |
||
| 78 |
/// operator of the current owner. |
||
| 79 |
/// @param _approved The new approved NFT controller |
||
| 80 |
/// @param _tokenId The NFT to approve |
||
| 81 |
function approve(address _approved, uint256 _tokenId) external payable; |
||
| 82 | |||
| 83 |
/// @notice Enable or disable approval for a third party ("operator") to manage
|
||
| 84 |
/// all of `msg.sender`'s assets |
||
| 85 |
/// @dev Emits the ApprovalForAll event. The contract MUST allow |
||
| 86 |
/// multiple operators per owner. |
||
| 87 |
/// @param _operator Address to add to the set of authorized operators |
||
| 88 |
/// @param _approved True if the operator is approved, false to revoke approval |
||
| 89 |
function setApprovalForAll(address _operator, bool _approved) external; |
||
| 90 | |||
| 91 |
/// @notice Get the approved address for a single NFT |
||
| 92 |
/// @dev Throws if `_tokenId` is not a valid NFT. |
||
| 93 |
/// @param _tokenId The NFT to find the approved address for |
||
| 94 |
/// @return The approved address for this NFT, or the zero address if there is none |
||
| 95 |
function getApproved(uint256 _tokenId) external view returns (address); |
||
| 96 | |||
| 97 |
/// @notice Query if an address is an authorized operator for another address |
||
| 98 |
/// @param _owner The address that owns the NFTs |
||
| 99 |
/// @param _operator The address that acts on behalf of the owner |
||
| 100 |
/// @return True if `_operator` is an approved operator for `_owner`, false otherwise |
||
| 101 |
function isApprovedForAll(address _owner, address _operator) external view returns (bool); |
||
| 102 |
} |
||
| 103 | |||
| 104 |
/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02. |
||
| 105 |
interface IERC721TokenReceiver {
|
||
| 106 |
/// @notice Handle the receipt of an NFT |
||
| 107 |
/// @dev The ERC721 smart contract calls this function on the recipient |
||
| 108 |
/// after a `transfer`. This function MAY throw to revert and reject the |
||
| 109 |
/// transfer. Return of other than the magic value MUST result in the |
||
| 110 |
/// transaction being reverted. |
||
| 111 |
/// Note: the contract address is always the message sender. |
||
| 112 |
/// @param _operator The address which called `safeTransferFrom` function |
||
| 113 |
/// @param _from The address which previously owned the token |
||
| 114 |
/// @param _tokenId The NFT identifier which is being transferred |
||
| 115 |
/// @param _data Additional data with no specified format |
||
| 116 |
/// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
|
||
| 117 |
/// unless throwing |
||
| 118 |
function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes calldata _data) |
||
| 119 |
external |
||
| 120 |
returns (bytes4); |
||
| 121 |
} |
||
| 122 | |||
| 123 |
/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension |
||
| 124 |
/// @dev See https://eips.ethereum.org/EIPS/eip-721 |
||
| 125 |
/// Note: the ERC-165 identifier for this interface is 0x5b5e139f. |
||
| 126 |
interface IERC721Metadata is IERC721 {
|
||
| 127 |
/// @notice A descriptive name for a collection of NFTs in this contract |
||
| 128 |
function name() external view returns (string memory _name); |
||
| 129 | |||
| 130 |
/// @notice An abbreviated name for NFTs in this contract |
||
| 131 |
function symbol() external view returns (string memory _symbol); |
||
| 132 | |||
| 133 |
/// @notice A distinct Uniform Resource Identifier (URI) for a given asset. |
||
| 134 |
/// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC |
||
| 135 |
/// 3986. The URI may point to a JSON file that conforms to the "ERC721 |
||
| 136 |
/// Metadata JSON Schema". |
||
| 137 |
function tokenURI(uint256 _tokenId) external view returns (string memory); |
||
| 138 |
} |
||
| 139 | |||
| 140 |
/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension |
||
| 141 |
/// @dev See https://eips.ethereum.org/EIPS/eip-721 |
||
| 142 |
/// Note: the ERC-165 identifier for this interface is 0x780e9d63. |
||
| 143 |
interface IERC721Enumerable is IERC721 {
|
||
| 144 |
/// @notice Count NFTs tracked by this contract |
||
| 145 |
/// @return A count of valid NFTs tracked by this contract, where each one of |
||
| 146 |
/// them has an assigned and queryable owner not equal to the zero address |
||
| 147 |
function totalSupply() external view returns (uint256); |
||
| 148 | |||
| 149 |
/// @notice Enumerate valid NFTs |
||
| 150 |
/// @dev Throws if `_index` >= `totalSupply()`. |
||
| 151 |
/// @param _index A counter less than `totalSupply()` |
||
| 152 |
/// @return The token identifier for the `_index`th NFT, |
||
| 153 |
/// (sort order not specified) |
||
| 154 |
function tokenByIndex(uint256 _index) external view returns (uint256); |
||
| 155 | |||
| 156 |
/// @notice Enumerate NFTs assigned to an owner |
||
| 157 |
/// @dev Throws if `_index` >= `balanceOf(_owner)` or if |
||
| 158 |
/// `_owner` is the zero address, representing invalid NFTs. |
||
| 159 |
/// @param _owner An address where we are interested in NFTs owned by them |
||
| 160 |
/// @param _index A counter less than `balanceOf(_owner)` |
||
| 161 |
/// @return The token identifier for the `_index`th NFT assigned to `_owner`, |
||
| 162 |
/// (sort order not specified) |
||
| 163 |
function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256); |
||
| 164 |
} |
||
| 165 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
pragma experimental ABIEncoderV2; |
||
| 5 | |||
| 6 |
interface IMulticall3 {
|
||
| 7 |
struct Call {
|
||
| 8 |
address target; |
||
| 9 |
bytes callData; |
||
| 10 |
} |
||
| 11 | |||
| 12 |
struct Call3 {
|
||
| 13 |
address target; |
||
| 14 |
bool allowFailure; |
||
| 15 |
bytes callData; |
||
| 16 |
} |
||
| 17 | |||
| 18 |
struct Call3Value {
|
||
| 19 |
address target; |
||
| 20 |
bool allowFailure; |
||
| 21 |
uint256 value; |
||
| 22 |
bytes callData; |
||
| 23 |
} |
||
| 24 | |||
| 25 |
struct Result {
|
||
| 26 |
bool success; |
||
| 27 |
bytes returnData; |
||
| 28 |
} |
||
| 29 | |||
| 30 |
function aggregate(Call[] calldata calls) |
||
| 31 |
external |
||
| 32 |
payable |
||
| 33 |
returns (uint256 blockNumber, bytes[] memory returnData); |
||
| 34 | |||
| 35 |
function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData); |
||
| 36 | |||
| 37 |
function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData); |
||
| 38 | |||
| 39 |
function blockAndAggregate(Call[] calldata calls) |
||
| 40 |
external |
||
| 41 |
payable |
||
| 42 |
returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData); |
||
| 43 | |||
| 44 |
function getBasefee() external view returns (uint256 basefee); |
||
| 45 | |||
| 46 |
function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash); |
||
| 47 | |||
| 48 |
function getBlockNumber() external view returns (uint256 blockNumber); |
||
| 49 | |||
| 50 |
function getChainId() external view returns (uint256 chainid); |
||
| 51 | |||
| 52 |
function getCurrentBlockCoinbase() external view returns (address coinbase); |
||
| 53 | |||
| 54 |
function getCurrentBlockDifficulty() external view returns (uint256 difficulty); |
||
| 55 | |||
| 56 |
function getCurrentBlockGasLimit() external view returns (uint256 gaslimit); |
||
| 57 | |||
| 58 |
function getCurrentBlockTimestamp() external view returns (uint256 timestamp); |
||
| 59 | |||
| 60 |
function getEthBalance(address addr) external view returns (uint256 balance); |
||
| 61 | |||
| 62 |
function getLastBlockHash() external view returns (bytes32 blockHash); |
||
| 63 | |||
| 64 |
function tryAggregate(bool requireSuccess, Call[] calldata calls) |
||
| 65 |
external |
||
| 66 |
payable |
||
| 67 |
returns (Result[] memory returnData); |
||
| 68 | |||
| 69 |
function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls) |
||
| 70 |
external |
||
| 71 |
payable |
||
| 72 |
returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData); |
||
| 73 |
} |
||
| 74 |
| Lines covered: | 0 / 63 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
import {IERC20} from "../interfaces/IERC20.sol";
|
||
| 5 | |||
| 6 |
/// @notice This is a mock contract of the ERC20 standard for testing purposes only, it SHOULD NOT be used in production. |
||
| 7 |
/// @dev Forked from: https://github.com/transmissions11/solmate/blob/0384dbaaa4fcb5715738a9254a7c0a4cb62cf458/src/tokens/ERC20.sol |
||
| 8 |
contract MockERC20 is IERC20 {
|
||
| 9 |
/*////////////////////////////////////////////////////////////// |
||
| 10 |
METADATA STORAGE |
||
| 11 |
//////////////////////////////////////////////////////////////*/ |
||
| 12 | |||
| 13 |
string internal _name; |
||
| 14 | |||
| 15 |
string internal _symbol; |
||
| 16 | |||
| 17 |
uint8 internal _decimals; |
||
| 18 | |||
| 19 |
function name() external view override returns (string memory) {
|
||
| 20 |
return _name; |
||
| 21 |
} |
||
| 22 | |||
| 23 |
function symbol() external view override returns (string memory) {
|
||
| 24 |
return _symbol; |
||
| 25 |
} |
||
| 26 | |||
| 27 |
function decimals() external view override returns (uint8) {
|
||
| 28 |
return _decimals; |
||
| 29 |
} |
||
| 30 | |||
| 31 |
/*////////////////////////////////////////////////////////////// |
||
| 32 |
ERC20 STORAGE |
||
| 33 |
//////////////////////////////////////////////////////////////*/ |
||
| 34 | |||
| 35 |
uint256 internal _totalSupply; |
||
| 36 | |||
| 37 |
mapping(address => uint256) internal _balanceOf; |
||
| 38 | |||
| 39 |
mapping(address => mapping(address => uint256)) internal _allowance; |
||
| 40 | |||
| 41 |
function totalSupply() external view override returns (uint256) {
|
||
| 42 |
return _totalSupply; |
||
| 43 |
} |
||
| 44 | |||
| 45 |
function balanceOf(address owner) external view override returns (uint256) {
|
||
| 46 |
return _balanceOf[owner]; |
||
| 47 |
} |
||
| 48 | |||
| 49 |
function allowance(address owner, address spender) external view override returns (uint256) {
|
||
| 50 |
return _allowance[owner][spender]; |
||
| 51 |
} |
||
| 52 | |||
| 53 |
/*////////////////////////////////////////////////////////////// |
||
| 54 |
EIP-2612 STORAGE |
||
| 55 |
//////////////////////////////////////////////////////////////*/ |
||
| 56 | |||
| 57 |
uint256 internal INITIAL_CHAIN_ID; |
||
| 58 | |||
| 59 |
bytes32 internal INITIAL_DOMAIN_SEPARATOR; |
||
| 60 | |||
| 61 |
mapping(address => uint256) public nonces; |
||
| 62 | |||
| 63 |
/*////////////////////////////////////////////////////////////// |
||
| 64 |
INITIALIZE |
||
| 65 |
//////////////////////////////////////////////////////////////*/ |
||
| 66 | |||
| 67 |
/// @dev A bool to track whether the contract has been initialized. |
||
| 68 |
bool private initialized; |
||
| 69 | |||
| 70 |
/// @dev To hide constructor warnings across solc versions due to different constructor visibility requirements and |
||
| 71 |
/// syntaxes, we add an initialization function that can be called only once. |
||
| 72 |
function initialize(string memory name_, string memory symbol_, uint8 decimals_) public {
|
||
| 73 |
require(!initialized, "ALREADY_INITIALIZED"); |
||
| 74 | |||
| 75 |
_name = name_; |
||
| 76 |
_symbol = symbol_; |
||
| 77 |
_decimals = decimals_; |
||
| 78 | |||
| 79 |
INITIAL_CHAIN_ID = _pureChainId(); |
||
| 80 |
INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); |
||
| 81 | |||
| 82 |
initialized = true; |
||
| 83 |
} |
||
| 84 | |||
| 85 |
/*////////////////////////////////////////////////////////////// |
||
| 86 |
ERC20 LOGIC |
||
| 87 |
//////////////////////////////////////////////////////////////*/ |
||
| 88 | |||
| 89 |
function approve(address spender, uint256 amount) public virtual override returns (bool) {
|
||
| 90 |
_allowance[msg.sender][spender] = amount; |
||
| 91 | |||
| 92 |
emit Approval(msg.sender, spender, amount); |
||
| 93 | |||
| 94 |
return true; |
||
| 95 |
} |
||
| 96 | |||
| 97 |
function transfer(address to, uint256 amount) public virtual override returns (bool) {
|
||
| 98 |
_balanceOf[msg.sender] = _sub(_balanceOf[msg.sender], amount); |
||
| 99 |
_balanceOf[to] = _add(_balanceOf[to], amount); |
||
| 100 | |||
| 101 |
emit Transfer(msg.sender, to, amount); |
||
| 102 | |||
| 103 |
return true; |
||
| 104 |
} |
||
| 105 | |||
| 106 |
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
|
||
| 107 |
uint256 allowed = _allowance[from][msg.sender]; // Saves gas for limited approvals. |
||
| 108 | |||
| 109 |
if (allowed != ~uint256(0)) _allowance[from][msg.sender] = _sub(allowed, amount); |
||
| 110 | |||
| 111 |
_balanceOf[from] = _sub(_balanceOf[from], amount); |
||
| 112 |
_balanceOf[to] = _add(_balanceOf[to], amount); |
||
| 113 | |||
| 114 |
emit Transfer(from, to, amount); |
||
| 115 | |||
| 116 |
return true; |
||
| 117 |
} |
||
| 118 | |||
| 119 |
/*////////////////////////////////////////////////////////////// |
||
| 120 |
EIP-2612 LOGIC |
||
| 121 |
//////////////////////////////////////////////////////////////*/ |
||
| 122 | |||
| 123 |
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) |
||
| 124 |
public |
||
| 125 |
virtual |
||
| 126 |
{
|
||
| 127 |
require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); |
||
| 128 | |||
| 129 |
address recoveredAddress = ecrecover( |
||
| 130 |
keccak256( |
||
| 131 |
abi.encodePacked( |
||
| 132 |
"\x19\x01", |
||
| 133 |
DOMAIN_SEPARATOR(), |
||
| 134 |
keccak256( |
||
| 135 |
abi.encode( |
||
| 136 |
keccak256( |
||
| 137 |
"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" |
||
| 138 |
), |
||
| 139 |
owner, |
||
| 140 |
spender, |
||
| 141 |
value, |
||
| 142 |
nonces[owner]++, |
||
| 143 |
deadline |
||
| 144 |
) |
||
| 145 |
) |
||
| 146 |
) |
||
| 147 |
), |
||
| 148 |
v, |
||
| 149 |
r, |
||
| 150 |
s |
||
| 151 |
); |
||
| 152 | |||
| 153 |
require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); |
||
| 154 | |||
| 155 |
_allowance[recoveredAddress][spender] = value; |
||
| 156 | |||
| 157 |
emit Approval(owner, spender, value); |
||
| 158 |
} |
||
| 159 | |||
| 160 |
function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
|
||
| 161 |
return _pureChainId() == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); |
||
| 162 |
} |
||
| 163 | |||
| 164 |
function computeDomainSeparator() internal view virtual returns (bytes32) {
|
||
| 165 |
return keccak256( |
||
| 166 |
abi.encode( |
||
| 167 |
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
|
||
| 168 |
keccak256(bytes(_name)), |
||
| 169 |
keccak256("1"),
|
||
| 170 |
_pureChainId(), |
||
| 171 |
address(this) |
||
| 172 |
) |
||
| 173 |
); |
||
| 174 |
} |
||
| 175 | |||
| 176 |
/*////////////////////////////////////////////////////////////// |
||
| 177 |
INTERNAL MINT/BURN LOGIC |
||
| 178 |
//////////////////////////////////////////////////////////////*/ |
||
| 179 | |||
| 180 |
function _mint(address to, uint256 amount) internal virtual {
|
||
| 181 |
_totalSupply = _add(_totalSupply, amount); |
||
| 182 |
_balanceOf[to] = _add(_balanceOf[to], amount); |
||
| 183 | |||
| 184 |
emit Transfer(address(0), to, amount); |
||
| 185 |
} |
||
| 186 | |||
| 187 |
function _burn(address from, uint256 amount) internal virtual {
|
||
| 188 |
_balanceOf[from] = _sub(_balanceOf[from], amount); |
||
| 189 |
_totalSupply = _sub(_totalSupply, amount); |
||
| 190 | |||
| 191 |
emit Transfer(from, address(0), amount); |
||
| 192 |
} |
||
| 193 | |||
| 194 |
/*////////////////////////////////////////////////////////////// |
||
| 195 |
INTERNAL SAFE MATH LOGIC |
||
| 196 |
//////////////////////////////////////////////////////////////*/ |
||
| 197 | |||
| 198 |
function _add(uint256 a, uint256 b) internal pure returns (uint256) {
|
||
| 199 |
uint256 c = a + b; |
||
| 200 |
require(c >= a, "ERC20: addition overflow"); |
||
| 201 |
return c; |
||
| 202 |
} |
||
| 203 | |||
| 204 |
function _sub(uint256 a, uint256 b) internal pure returns (uint256) {
|
||
| 205 |
require(a >= b, "ERC20: subtraction underflow"); |
||
| 206 |
return a - b; |
||
| 207 |
} |
||
| 208 | |||
| 209 |
/*////////////////////////////////////////////////////////////// |
||
| 210 |
HELPERS |
||
| 211 |
//////////////////////////////////////////////////////////////*/ |
||
| 212 | |||
| 213 |
// We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no |
||
| 214 |
// compiler warnings when accessing chain ID in any solidity version supported by forge-std. We |
||
| 215 |
// can't simply access the chain ID in a normal view or pure function because the solc View Pure |
||
| 216 |
// Checker changed `chainid` from pure to view in 0.8.0. |
||
| 217 |
function _viewChainId() private view returns (uint256 chainId) {
|
||
| 218 |
// Assembly required since `block.chainid` was introduced in 0.8.0. |
||
| 219 |
assembly {
|
||
| 220 |
chainId := chainid() |
||
| 221 |
} |
||
| 222 | |||
| 223 |
address(this); // Silence warnings in older Solc versions. |
||
| 224 |
} |
||
| 225 | |||
| 226 |
function _pureChainId() private pure returns (uint256 chainId) {
|
||
| 227 |
function() internal view returns (uint256) fnIn = _viewChainId; |
||
| 228 |
function() internal pure returns (uint256) pureChainId; |
||
| 229 |
assembly {
|
||
| 230 |
pureChainId := fnIn |
||
| 231 |
} |
||
| 232 |
chainId = pureChainId(); |
||
| 233 |
} |
||
| 234 |
} |
||
| 235 |
| Lines covered: | 0 / 45 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
import {IERC721Metadata} from "../interfaces/IERC721.sol";
|
||
| 5 | |||
| 6 |
/// @notice This is a mock contract of the ERC721 standard for testing purposes only, it SHOULD NOT be used in production. |
||
| 7 |
/// @dev Forked from: https://github.com/transmissions11/solmate/blob/0384dbaaa4fcb5715738a9254a7c0a4cb62cf458/src/tokens/ERC721.sol |
||
| 8 |
contract MockERC721 is IERC721Metadata {
|
||
| 9 |
/*////////////////////////////////////////////////////////////// |
||
| 10 |
METADATA STORAGE/LOGIC |
||
| 11 |
//////////////////////////////////////////////////////////////*/ |
||
| 12 | |||
| 13 |
string internal _name; |
||
| 14 | |||
| 15 |
string internal _symbol; |
||
| 16 | |||
| 17 |
function name() external view override returns (string memory) {
|
||
| 18 |
return _name; |
||
| 19 |
} |
||
| 20 | |||
| 21 |
function symbol() external view override returns (string memory) {
|
||
| 22 |
return _symbol; |
||
| 23 |
} |
||
| 24 | |||
| 25 |
function tokenURI(uint256 id) public view virtual override returns (string memory) {}
|
||
| 26 | |||
| 27 |
/*////////////////////////////////////////////////////////////// |
||
| 28 |
ERC721 BALANCE/OWNER STORAGE |
||
| 29 |
//////////////////////////////////////////////////////////////*/ |
||
| 30 | |||
| 31 |
mapping(uint256 => address) internal _ownerOf; |
||
| 32 | |||
| 33 |
mapping(address => uint256) internal _balanceOf; |
||
| 34 | |||
| 35 |
function ownerOf(uint256 id) public view virtual override returns (address owner) {
|
||
| 36 |
require((owner = _ownerOf[id]) != address(0), "NOT_MINTED"); |
||
| 37 |
} |
||
| 38 | |||
| 39 |
function balanceOf(address owner) public view virtual override returns (uint256) {
|
||
| 40 |
require(owner != address(0), "ZERO_ADDRESS"); |
||
| 41 | |||
| 42 |
return _balanceOf[owner]; |
||
| 43 |
} |
||
| 44 | |||
| 45 |
/*////////////////////////////////////////////////////////////// |
||
| 46 |
ERC721 APPROVAL STORAGE |
||
| 47 |
//////////////////////////////////////////////////////////////*/ |
||
| 48 | |||
| 49 |
mapping(uint256 => address) internal _getApproved; |
||
| 50 | |||
| 51 |
mapping(address => mapping(address => bool)) internal _isApprovedForAll; |
||
| 52 | |||
| 53 |
function getApproved(uint256 id) public view virtual override returns (address) {
|
||
| 54 |
return _getApproved[id]; |
||
| 55 |
} |
||
| 56 | |||
| 57 |
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
|
||
| 58 |
return _isApprovedForAll[owner][operator]; |
||
| 59 |
} |
||
| 60 | |||
| 61 |
/*////////////////////////////////////////////////////////////// |
||
| 62 |
INITIALIZE |
||
| 63 |
//////////////////////////////////////////////////////////////*/ |
||
| 64 | |||
| 65 |
/// @dev A bool to track whether the contract has been initialized. |
||
| 66 |
bool private initialized; |
||
| 67 | |||
| 68 |
/// @dev To hide constructor warnings across solc versions due to different constructor visibility requirements and |
||
| 69 |
/// syntaxes, we add an initialization function that can be called only once. |
||
| 70 |
function initialize(string memory name_, string memory symbol_) public {
|
||
| 71 |
require(!initialized, "ALREADY_INITIALIZED"); |
||
| 72 | |||
| 73 |
_name = name_; |
||
| 74 |
_symbol = symbol_; |
||
| 75 | |||
| 76 |
initialized = true; |
||
| 77 |
} |
||
| 78 | |||
| 79 |
/*////////////////////////////////////////////////////////////// |
||
| 80 |
ERC721 LOGIC |
||
| 81 |
//////////////////////////////////////////////////////////////*/ |
||
| 82 | |||
| 83 |
function approve(address spender, uint256 id) public payable virtual override {
|
||
| 84 |
address owner = _ownerOf[id]; |
||
| 85 | |||
| 86 |
require(msg.sender == owner || _isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED"); |
||
| 87 | |||
| 88 |
_getApproved[id] = spender; |
||
| 89 | |||
| 90 |
emit Approval(owner, spender, id); |
||
| 91 |
} |
||
| 92 | |||
| 93 |
function setApprovalForAll(address operator, bool approved) public virtual override {
|
||
| 94 |
_isApprovedForAll[msg.sender][operator] = approved; |
||
| 95 | |||
| 96 |
emit ApprovalForAll(msg.sender, operator, approved); |
||
| 97 |
} |
||
| 98 | |||
| 99 |
function transferFrom(address from, address to, uint256 id) public payable virtual override {
|
||
| 100 |
require(from == _ownerOf[id], "WRONG_FROM"); |
||
| 101 | |||
| 102 |
require(to != address(0), "INVALID_RECIPIENT"); |
||
| 103 | |||
| 104 |
require( |
||
| 105 |
msg.sender == from || _isApprovedForAll[from][msg.sender] || msg.sender == _getApproved[id], |
||
| 106 |
"NOT_AUTHORIZED" |
||
| 107 |
); |
||
| 108 | |||
| 109 |
// Underflow of the sender's balance is impossible because we check for |
||
| 110 |
// ownership above and the recipient's balance can't realistically overflow. |
||
| 111 |
_balanceOf[from]--; |
||
| 112 | |||
| 113 |
_balanceOf[to]++; |
||
| 114 | |||
| 115 |
_ownerOf[id] = to; |
||
| 116 | |||
| 117 |
delete _getApproved[id]; |
||
| 118 | |||
| 119 |
emit Transfer(from, to, id); |
||
| 120 |
} |
||
| 121 | |||
| 122 |
function safeTransferFrom(address from, address to, uint256 id) public payable virtual override {
|
||
| 123 |
transferFrom(from, to, id); |
||
| 124 | |||
| 125 |
require( |
||
| 126 |
!_isContract(to) |
||
| 127 |
|| IERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") |
||
| 128 |
== IERC721TokenReceiver.onERC721Received.selector, |
||
| 129 |
"UNSAFE_RECIPIENT" |
||
| 130 |
); |
||
| 131 |
} |
||
| 132 | |||
| 133 |
function safeTransferFrom(address from, address to, uint256 id, bytes memory data) |
||
| 134 |
public |
||
| 135 |
payable |
||
| 136 |
virtual |
||
| 137 |
override |
||
| 138 |
{
|
||
| 139 |
transferFrom(from, to, id); |
||
| 140 | |||
| 141 |
require( |
||
| 142 |
!_isContract(to) |
||
| 143 |
|| IERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) |
||
| 144 |
== IERC721TokenReceiver.onERC721Received.selector, |
||
| 145 |
"UNSAFE_RECIPIENT" |
||
| 146 |
); |
||
| 147 |
} |
||
| 148 | |||
| 149 |
/*////////////////////////////////////////////////////////////// |
||
| 150 |
ERC165 LOGIC |
||
| 151 |
//////////////////////////////////////////////////////////////*/ |
||
| 152 | |||
| 153 |
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
|
||
| 154 |
return interfaceId == 0x01ffc9a7 // ERC165 Interface ID for ERC165 |
||
| 155 |
|| interfaceId == 0x80ac58cd // ERC165 Interface ID for ERC721 |
||
| 156 |
|| interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata |
||
| 157 |
} |
||
| 158 | |||
| 159 |
/*////////////////////////////////////////////////////////////// |
||
| 160 |
INTERNAL MINT/BURN LOGIC |
||
| 161 |
//////////////////////////////////////////////////////////////*/ |
||
| 162 | |||
| 163 |
function _mint(address to, uint256 id) internal virtual {
|
||
| 164 |
require(to != address(0), "INVALID_RECIPIENT"); |
||
| 165 | |||
| 166 |
require(_ownerOf[id] == address(0), "ALREADY_MINTED"); |
||
| 167 | |||
| 168 |
// Counter overflow is incredibly unrealistic. |
||
| 169 | |||
| 170 |
_balanceOf[to]++; |
||
| 171 | |||
| 172 |
_ownerOf[id] = to; |
||
| 173 | |||
| 174 |
emit Transfer(address(0), to, id); |
||
| 175 |
} |
||
| 176 | |||
| 177 |
function _burn(uint256 id) internal virtual {
|
||
| 178 |
address owner = _ownerOf[id]; |
||
| 179 | |||
| 180 |
require(owner != address(0), "NOT_MINTED"); |
||
| 181 | |||
| 182 |
_balanceOf[owner]--; |
||
| 183 | |||
| 184 |
delete _ownerOf[id]; |
||
| 185 | |||
| 186 |
delete _getApproved[id]; |
||
| 187 | |||
| 188 |
emit Transfer(owner, address(0), id); |
||
| 189 |
} |
||
| 190 | |||
| 191 |
/*////////////////////////////////////////////////////////////// |
||
| 192 |
INTERNAL SAFE MINT LOGIC |
||
| 193 |
//////////////////////////////////////////////////////////////*/ |
||
| 194 | |||
| 195 |
function _safeMint(address to, uint256 id) internal virtual {
|
||
| 196 |
_mint(to, id); |
||
| 197 | |||
| 198 |
require( |
||
| 199 |
!_isContract(to) |
||
| 200 |
|| IERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") |
||
| 201 |
== IERC721TokenReceiver.onERC721Received.selector, |
||
| 202 |
"UNSAFE_RECIPIENT" |
||
| 203 |
); |
||
| 204 |
} |
||
| 205 | |||
| 206 |
function _safeMint(address to, uint256 id, bytes memory data) internal virtual {
|
||
| 207 |
_mint(to, id); |
||
| 208 | |||
| 209 |
require( |
||
| 210 |
!_isContract(to) |
||
| 211 |
|| IERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) |
||
| 212 |
== IERC721TokenReceiver.onERC721Received.selector, |
||
| 213 |
"UNSAFE_RECIPIENT" |
||
| 214 |
); |
||
| 215 |
} |
||
| 216 | |||
| 217 |
/*////////////////////////////////////////////////////////////// |
||
| 218 |
HELPERS |
||
| 219 |
//////////////////////////////////////////////////////////////*/ |
||
| 220 | |||
| 221 |
function _isContract(address _addr) private view returns (bool) {
|
||
| 222 |
uint256 codeLength; |
||
| 223 | |||
| 224 |
// Assembly required for versions < 0.8.0 to check extcodesize. |
||
| 225 |
assembly {
|
||
| 226 |
codeLength := extcodesize(_addr) |
||
| 227 |
} |
||
| 228 | |||
| 229 |
return codeLength > 0; |
||
| 230 |
} |
||
| 231 |
} |
||
| 232 | |||
| 233 |
interface IERC721TokenReceiver {
|
||
| 234 |
function onERC721Received(address, address, uint256, bytes calldata) external returns (bytes4); |
||
| 235 |
} |
||
| 236 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
pragma solidity >=0.6.2 <0.9.0; |
||
| 3 | |||
| 4 |
/// @author philogy <https://github.com/philogy> |
||
| 5 |
/// @dev Code generated automatically by script. |
||
| 6 |
library safeconsole {
|
||
| 7 |
uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67; |
||
| 8 | |||
| 9 |
// Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374) |
||
| 10 |
// for the view-to-pure log trick. |
||
| 11 |
function _sendLogPayload(uint256 offset, uint256 size) private pure {
|
||
| 12 |
function(uint256, uint256) internal view fnIn = _sendLogPayloadView; |
||
| 13 |
function(uint256, uint256) internal pure pureSendLogPayload; |
||
| 14 |
assembly {
|
||
| 15 |
pureSendLogPayload := fnIn |
||
| 16 |
} |
||
| 17 |
pureSendLogPayload(offset, size); |
||
| 18 |
} |
||
| 19 | |||
| 20 |
function _sendLogPayloadView(uint256 offset, uint256 size) private view {
|
||
| 21 |
assembly {
|
||
| 22 |
pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0)) |
||
| 23 |
} |
||
| 24 |
} |
||
| 25 | |||
| 26 |
function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {
|
||
| 27 |
function(uint256, uint256, uint256) internal view fnIn = _memcopyView; |
||
| 28 |
function(uint256, uint256, uint256) internal pure pureMemcopy; |
||
| 29 |
assembly {
|
||
| 30 |
pureMemcopy := fnIn |
||
| 31 |
} |
||
| 32 |
pureMemcopy(fromOffset, toOffset, length); |
||
| 33 |
} |
||
| 34 | |||
| 35 |
function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {
|
||
| 36 |
assembly {
|
||
| 37 |
pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length)) |
||
| 38 |
} |
||
| 39 |
} |
||
| 40 | |||
| 41 |
function logMemory(uint256 offset, uint256 length) internal pure {
|
||
| 42 |
if (offset >= 0x60) {
|
||
| 43 |
// Sufficient memory before slice to prepare call header. |
||
| 44 |
bytes32 m0; |
||
| 45 |
bytes32 m1; |
||
| 46 |
bytes32 m2; |
||
| 47 |
assembly {
|
||
| 48 |
m0 := mload(sub(offset, 0x60)) |
||
| 49 |
m1 := mload(sub(offset, 0x40)) |
||
| 50 |
m2 := mload(sub(offset, 0x20)) |
||
| 51 |
// Selector of `logBytes(bytes)`. |
||
| 52 |
mstore(sub(offset, 0x60), 0xe17bf956) |
||
| 53 |
mstore(sub(offset, 0x40), 0x20) |
||
| 54 |
mstore(sub(offset, 0x20), length) |
||
| 55 |
} |
||
| 56 |
_sendLogPayload(offset - 0x44, length + 0x44); |
||
| 57 |
assembly {
|
||
| 58 |
mstore(sub(offset, 0x60), m0) |
||
| 59 |
mstore(sub(offset, 0x40), m1) |
||
| 60 |
mstore(sub(offset, 0x20), m2) |
||
| 61 |
} |
||
| 62 |
} else {
|
||
| 63 |
// Insufficient space, so copy slice forward, add header and reverse. |
||
| 64 |
bytes32 m0; |
||
| 65 |
bytes32 m1; |
||
| 66 |
bytes32 m2; |
||
| 67 |
uint256 endOffset = offset + length; |
||
| 68 |
assembly {
|
||
| 69 |
m0 := mload(add(endOffset, 0x00)) |
||
| 70 |
m1 := mload(add(endOffset, 0x20)) |
||
| 71 |
m2 := mload(add(endOffset, 0x40)) |
||
| 72 |
} |
||
| 73 |
_memcopy(offset, offset + 0x60, length); |
||
| 74 |
assembly {
|
||
| 75 |
// Selector of `logBytes(bytes)`. |
||
| 76 |
mstore(add(offset, 0x00), 0xe17bf956) |
||
| 77 |
mstore(add(offset, 0x20), 0x20) |
||
| 78 |
mstore(add(offset, 0x40), length) |
||
| 79 |
} |
||
| 80 |
_sendLogPayload(offset + 0x1c, length + 0x44); |
||
| 81 |
_memcopy(offset + 0x60, offset, length); |
||
| 82 |
assembly {
|
||
| 83 |
mstore(add(endOffset, 0x00), m0) |
||
| 84 |
mstore(add(endOffset, 0x20), m1) |
||
| 85 |
mstore(add(endOffset, 0x40), m2) |
||
| 86 |
} |
||
| 87 |
} |
||
| 88 |
} |
||
| 89 | |||
| 90 |
function log(address p0) internal pure {
|
||
| 91 |
bytes32 m0; |
||
| 92 |
bytes32 m1; |
||
| 93 |
assembly {
|
||
| 94 |
m0 := mload(0x00) |
||
| 95 |
m1 := mload(0x20) |
||
| 96 |
// Selector of `log(address)`. |
||
| 97 |
mstore(0x00, 0x2c2ecbc2) |
||
| 98 |
mstore(0x20, p0) |
||
| 99 |
} |
||
| 100 |
_sendLogPayload(0x1c, 0x24); |
||
| 101 |
assembly {
|
||
| 102 |
mstore(0x00, m0) |
||
| 103 |
mstore(0x20, m1) |
||
| 104 |
} |
||
| 105 |
} |
||
| 106 | |||
| 107 |
function log(bool p0) internal pure {
|
||
| 108 |
bytes32 m0; |
||
| 109 |
bytes32 m1; |
||
| 110 |
assembly {
|
||
| 111 |
m0 := mload(0x00) |
||
| 112 |
m1 := mload(0x20) |
||
| 113 |
// Selector of `log(bool)`. |
||
| 114 |
mstore(0x00, 0x32458eed) |
||
| 115 |
mstore(0x20, p0) |
||
| 116 |
} |
||
| 117 |
_sendLogPayload(0x1c, 0x24); |
||
| 118 |
assembly {
|
||
| 119 |
mstore(0x00, m0) |
||
| 120 |
mstore(0x20, m1) |
||
| 121 |
} |
||
| 122 |
} |
||
| 123 | |||
| 124 |
function log(uint256 p0) internal pure {
|
||
| 125 |
bytes32 m0; |
||
| 126 |
bytes32 m1; |
||
| 127 |
assembly {
|
||
| 128 |
m0 := mload(0x00) |
||
| 129 |
m1 := mload(0x20) |
||
| 130 |
// Selector of `log(uint256)`. |
||
| 131 |
mstore(0x00, 0xf82c50f1) |
||
| 132 |
mstore(0x20, p0) |
||
| 133 |
} |
||
| 134 |
_sendLogPayload(0x1c, 0x24); |
||
| 135 |
assembly {
|
||
| 136 |
mstore(0x00, m0) |
||
| 137 |
mstore(0x20, m1) |
||
| 138 |
} |
||
| 139 |
} |
||
| 140 | |||
| 141 |
function log(bytes32 p0) internal pure {
|
||
| 142 |
bytes32 m0; |
||
| 143 |
bytes32 m1; |
||
| 144 |
bytes32 m2; |
||
| 145 |
bytes32 m3; |
||
| 146 |
assembly {
|
||
| 147 |
function writeString(pos, w) {
|
||
| 148 |
let length := 0 |
||
| 149 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 150 |
mstore(pos, length) |
||
| 151 |
let shift := sub(256, shl(3, length)) |
||
| 152 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 153 |
} |
||
| 154 |
m0 := mload(0x00) |
||
| 155 |
m1 := mload(0x20) |
||
| 156 |
m2 := mload(0x40) |
||
| 157 |
m3 := mload(0x60) |
||
| 158 |
// Selector of `log(string)`. |
||
| 159 |
mstore(0x00, 0x41304fac) |
||
| 160 |
mstore(0x20, 0x20) |
||
| 161 |
writeString(0x40, p0) |
||
| 162 |
} |
||
| 163 |
_sendLogPayload(0x1c, 0x64); |
||
| 164 |
assembly {
|
||
| 165 |
mstore(0x00, m0) |
||
| 166 |
mstore(0x20, m1) |
||
| 167 |
mstore(0x40, m2) |
||
| 168 |
mstore(0x60, m3) |
||
| 169 |
} |
||
| 170 |
} |
||
| 171 | |||
| 172 |
function log(address p0, address p1) internal pure {
|
||
| 173 |
bytes32 m0; |
||
| 174 |
bytes32 m1; |
||
| 175 |
bytes32 m2; |
||
| 176 |
assembly {
|
||
| 177 |
m0 := mload(0x00) |
||
| 178 |
m1 := mload(0x20) |
||
| 179 |
m2 := mload(0x40) |
||
| 180 |
// Selector of `log(address,address)`. |
||
| 181 |
mstore(0x00, 0xdaf0d4aa) |
||
| 182 |
mstore(0x20, p0) |
||
| 183 |
mstore(0x40, p1) |
||
| 184 |
} |
||
| 185 |
_sendLogPayload(0x1c, 0x44); |
||
| 186 |
assembly {
|
||
| 187 |
mstore(0x00, m0) |
||
| 188 |
mstore(0x20, m1) |
||
| 189 |
mstore(0x40, m2) |
||
| 190 |
} |
||
| 191 |
} |
||
| 192 | |||
| 193 |
function log(address p0, bool p1) internal pure {
|
||
| 194 |
bytes32 m0; |
||
| 195 |
bytes32 m1; |
||
| 196 |
bytes32 m2; |
||
| 197 |
assembly {
|
||
| 198 |
m0 := mload(0x00) |
||
| 199 |
m1 := mload(0x20) |
||
| 200 |
m2 := mload(0x40) |
||
| 201 |
// Selector of `log(address,bool)`. |
||
| 202 |
mstore(0x00, 0x75b605d3) |
||
| 203 |
mstore(0x20, p0) |
||
| 204 |
mstore(0x40, p1) |
||
| 205 |
} |
||
| 206 |
_sendLogPayload(0x1c, 0x44); |
||
| 207 |
assembly {
|
||
| 208 |
mstore(0x00, m0) |
||
| 209 |
mstore(0x20, m1) |
||
| 210 |
mstore(0x40, m2) |
||
| 211 |
} |
||
| 212 |
} |
||
| 213 | |||
| 214 |
function log(address p0, uint256 p1) internal pure {
|
||
| 215 |
bytes32 m0; |
||
| 216 |
bytes32 m1; |
||
| 217 |
bytes32 m2; |
||
| 218 |
assembly {
|
||
| 219 |
m0 := mload(0x00) |
||
| 220 |
m1 := mload(0x20) |
||
| 221 |
m2 := mload(0x40) |
||
| 222 |
// Selector of `log(address,uint256)`. |
||
| 223 |
mstore(0x00, 0x8309e8a8) |
||
| 224 |
mstore(0x20, p0) |
||
| 225 |
mstore(0x40, p1) |
||
| 226 |
} |
||
| 227 |
_sendLogPayload(0x1c, 0x44); |
||
| 228 |
assembly {
|
||
| 229 |
mstore(0x00, m0) |
||
| 230 |
mstore(0x20, m1) |
||
| 231 |
mstore(0x40, m2) |
||
| 232 |
} |
||
| 233 |
} |
||
| 234 | |||
| 235 |
function log(address p0, bytes32 p1) internal pure {
|
||
| 236 |
bytes32 m0; |
||
| 237 |
bytes32 m1; |
||
| 238 |
bytes32 m2; |
||
| 239 |
bytes32 m3; |
||
| 240 |
bytes32 m4; |
||
| 241 |
assembly {
|
||
| 242 |
function writeString(pos, w) {
|
||
| 243 |
let length := 0 |
||
| 244 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 245 |
mstore(pos, length) |
||
| 246 |
let shift := sub(256, shl(3, length)) |
||
| 247 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 248 |
} |
||
| 249 |
m0 := mload(0x00) |
||
| 250 |
m1 := mload(0x20) |
||
| 251 |
m2 := mload(0x40) |
||
| 252 |
m3 := mload(0x60) |
||
| 253 |
m4 := mload(0x80) |
||
| 254 |
// Selector of `log(address,string)`. |
||
| 255 |
mstore(0x00, 0x759f86bb) |
||
| 256 |
mstore(0x20, p0) |
||
| 257 |
mstore(0x40, 0x40) |
||
| 258 |
writeString(0x60, p1) |
||
| 259 |
} |
||
| 260 |
_sendLogPayload(0x1c, 0x84); |
||
| 261 |
assembly {
|
||
| 262 |
mstore(0x00, m0) |
||
| 263 |
mstore(0x20, m1) |
||
| 264 |
mstore(0x40, m2) |
||
| 265 |
mstore(0x60, m3) |
||
| 266 |
mstore(0x80, m4) |
||
| 267 |
} |
||
| 268 |
} |
||
| 269 | |||
| 270 |
function log(bool p0, address p1) internal pure {
|
||
| 271 |
bytes32 m0; |
||
| 272 |
bytes32 m1; |
||
| 273 |
bytes32 m2; |
||
| 274 |
assembly {
|
||
| 275 |
m0 := mload(0x00) |
||
| 276 |
m1 := mload(0x20) |
||
| 277 |
m2 := mload(0x40) |
||
| 278 |
// Selector of `log(bool,address)`. |
||
| 279 |
mstore(0x00, 0x853c4849) |
||
| 280 |
mstore(0x20, p0) |
||
| 281 |
mstore(0x40, p1) |
||
| 282 |
} |
||
| 283 |
_sendLogPayload(0x1c, 0x44); |
||
| 284 |
assembly {
|
||
| 285 |
mstore(0x00, m0) |
||
| 286 |
mstore(0x20, m1) |
||
| 287 |
mstore(0x40, m2) |
||
| 288 |
} |
||
| 289 |
} |
||
| 290 | |||
| 291 |
function log(bool p0, bool p1) internal pure {
|
||
| 292 |
bytes32 m0; |
||
| 293 |
bytes32 m1; |
||
| 294 |
bytes32 m2; |
||
| 295 |
assembly {
|
||
| 296 |
m0 := mload(0x00) |
||
| 297 |
m1 := mload(0x20) |
||
| 298 |
m2 := mload(0x40) |
||
| 299 |
// Selector of `log(bool,bool)`. |
||
| 300 |
mstore(0x00, 0x2a110e83) |
||
| 301 |
mstore(0x20, p0) |
||
| 302 |
mstore(0x40, p1) |
||
| 303 |
} |
||
| 304 |
_sendLogPayload(0x1c, 0x44); |
||
| 305 |
assembly {
|
||
| 306 |
mstore(0x00, m0) |
||
| 307 |
mstore(0x20, m1) |
||
| 308 |
mstore(0x40, m2) |
||
| 309 |
} |
||
| 310 |
} |
||
| 311 | |||
| 312 |
function log(bool p0, uint256 p1) internal pure {
|
||
| 313 |
bytes32 m0; |
||
| 314 |
bytes32 m1; |
||
| 315 |
bytes32 m2; |
||
| 316 |
assembly {
|
||
| 317 |
m0 := mload(0x00) |
||
| 318 |
m1 := mload(0x20) |
||
| 319 |
m2 := mload(0x40) |
||
| 320 |
// Selector of `log(bool,uint256)`. |
||
| 321 |
mstore(0x00, 0x399174d3) |
||
| 322 |
mstore(0x20, p0) |
||
| 323 |
mstore(0x40, p1) |
||
| 324 |
} |
||
| 325 |
_sendLogPayload(0x1c, 0x44); |
||
| 326 |
assembly {
|
||
| 327 |
mstore(0x00, m0) |
||
| 328 |
mstore(0x20, m1) |
||
| 329 |
mstore(0x40, m2) |
||
| 330 |
} |
||
| 331 |
} |
||
| 332 | |||
| 333 |
function log(bool p0, bytes32 p1) internal pure {
|
||
| 334 |
bytes32 m0; |
||
| 335 |
bytes32 m1; |
||
| 336 |
bytes32 m2; |
||
| 337 |
bytes32 m3; |
||
| 338 |
bytes32 m4; |
||
| 339 |
assembly {
|
||
| 340 |
function writeString(pos, w) {
|
||
| 341 |
let length := 0 |
||
| 342 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 343 |
mstore(pos, length) |
||
| 344 |
let shift := sub(256, shl(3, length)) |
||
| 345 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 346 |
} |
||
| 347 |
m0 := mload(0x00) |
||
| 348 |
m1 := mload(0x20) |
||
| 349 |
m2 := mload(0x40) |
||
| 350 |
m3 := mload(0x60) |
||
| 351 |
m4 := mload(0x80) |
||
| 352 |
// Selector of `log(bool,string)`. |
||
| 353 |
mstore(0x00, 0x8feac525) |
||
| 354 |
mstore(0x20, p0) |
||
| 355 |
mstore(0x40, 0x40) |
||
| 356 |
writeString(0x60, p1) |
||
| 357 |
} |
||
| 358 |
_sendLogPayload(0x1c, 0x84); |
||
| 359 |
assembly {
|
||
| 360 |
mstore(0x00, m0) |
||
| 361 |
mstore(0x20, m1) |
||
| 362 |
mstore(0x40, m2) |
||
| 363 |
mstore(0x60, m3) |
||
| 364 |
mstore(0x80, m4) |
||
| 365 |
} |
||
| 366 |
} |
||
| 367 | |||
| 368 |
function log(uint256 p0, address p1) internal pure {
|
||
| 369 |
bytes32 m0; |
||
| 370 |
bytes32 m1; |
||
| 371 |
bytes32 m2; |
||
| 372 |
assembly {
|
||
| 373 |
m0 := mload(0x00) |
||
| 374 |
m1 := mload(0x20) |
||
| 375 |
m2 := mload(0x40) |
||
| 376 |
// Selector of `log(uint256,address)`. |
||
| 377 |
mstore(0x00, 0x69276c86) |
||
| 378 |
mstore(0x20, p0) |
||
| 379 |
mstore(0x40, p1) |
||
| 380 |
} |
||
| 381 |
_sendLogPayload(0x1c, 0x44); |
||
| 382 |
assembly {
|
||
| 383 |
mstore(0x00, m0) |
||
| 384 |
mstore(0x20, m1) |
||
| 385 |
mstore(0x40, m2) |
||
| 386 |
} |
||
| 387 |
} |
||
| 388 | |||
| 389 |
function log(uint256 p0, bool p1) internal pure {
|
||
| 390 |
bytes32 m0; |
||
| 391 |
bytes32 m1; |
||
| 392 |
bytes32 m2; |
||
| 393 |
assembly {
|
||
| 394 |
m0 := mload(0x00) |
||
| 395 |
m1 := mload(0x20) |
||
| 396 |
m2 := mload(0x40) |
||
| 397 |
// Selector of `log(uint256,bool)`. |
||
| 398 |
mstore(0x00, 0x1c9d7eb3) |
||
| 399 |
mstore(0x20, p0) |
||
| 400 |
mstore(0x40, p1) |
||
| 401 |
} |
||
| 402 |
_sendLogPayload(0x1c, 0x44); |
||
| 403 |
assembly {
|
||
| 404 |
mstore(0x00, m0) |
||
| 405 |
mstore(0x20, m1) |
||
| 406 |
mstore(0x40, m2) |
||
| 407 |
} |
||
| 408 |
} |
||
| 409 | |||
| 410 |
function log(uint256 p0, uint256 p1) internal pure {
|
||
| 411 |
bytes32 m0; |
||
| 412 |
bytes32 m1; |
||
| 413 |
bytes32 m2; |
||
| 414 |
assembly {
|
||
| 415 |
m0 := mload(0x00) |
||
| 416 |
m1 := mload(0x20) |
||
| 417 |
m2 := mload(0x40) |
||
| 418 |
// Selector of `log(uint256,uint256)`. |
||
| 419 |
mstore(0x00, 0xf666715a) |
||
| 420 |
mstore(0x20, p0) |
||
| 421 |
mstore(0x40, p1) |
||
| 422 |
} |
||
| 423 |
_sendLogPayload(0x1c, 0x44); |
||
| 424 |
assembly {
|
||
| 425 |
mstore(0x00, m0) |
||
| 426 |
mstore(0x20, m1) |
||
| 427 |
mstore(0x40, m2) |
||
| 428 |
} |
||
| 429 |
} |
||
| 430 | |||
| 431 |
function log(uint256 p0, bytes32 p1) internal pure {
|
||
| 432 |
bytes32 m0; |
||
| 433 |
bytes32 m1; |
||
| 434 |
bytes32 m2; |
||
| 435 |
bytes32 m3; |
||
| 436 |
bytes32 m4; |
||
| 437 |
assembly {
|
||
| 438 |
function writeString(pos, w) {
|
||
| 439 |
let length := 0 |
||
| 440 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 441 |
mstore(pos, length) |
||
| 442 |
let shift := sub(256, shl(3, length)) |
||
| 443 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 444 |
} |
||
| 445 |
m0 := mload(0x00) |
||
| 446 |
m1 := mload(0x20) |
||
| 447 |
m2 := mload(0x40) |
||
| 448 |
m3 := mload(0x60) |
||
| 449 |
m4 := mload(0x80) |
||
| 450 |
// Selector of `log(uint256,string)`. |
||
| 451 |
mstore(0x00, 0x643fd0df) |
||
| 452 |
mstore(0x20, p0) |
||
| 453 |
mstore(0x40, 0x40) |
||
| 454 |
writeString(0x60, p1) |
||
| 455 |
} |
||
| 456 |
_sendLogPayload(0x1c, 0x84); |
||
| 457 |
assembly {
|
||
| 458 |
mstore(0x00, m0) |
||
| 459 |
mstore(0x20, m1) |
||
| 460 |
mstore(0x40, m2) |
||
| 461 |
mstore(0x60, m3) |
||
| 462 |
mstore(0x80, m4) |
||
| 463 |
} |
||
| 464 |
} |
||
| 465 | |||
| 466 |
function log(bytes32 p0, address p1) internal pure {
|
||
| 467 |
bytes32 m0; |
||
| 468 |
bytes32 m1; |
||
| 469 |
bytes32 m2; |
||
| 470 |
bytes32 m3; |
||
| 471 |
bytes32 m4; |
||
| 472 |
assembly {
|
||
| 473 |
function writeString(pos, w) {
|
||
| 474 |
let length := 0 |
||
| 475 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 476 |
mstore(pos, length) |
||
| 477 |
let shift := sub(256, shl(3, length)) |
||
| 478 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 479 |
} |
||
| 480 |
m0 := mload(0x00) |
||
| 481 |
m1 := mload(0x20) |
||
| 482 |
m2 := mload(0x40) |
||
| 483 |
m3 := mload(0x60) |
||
| 484 |
m4 := mload(0x80) |
||
| 485 |
// Selector of `log(string,address)`. |
||
| 486 |
mstore(0x00, 0x319af333) |
||
| 487 |
mstore(0x20, 0x40) |
||
| 488 |
mstore(0x40, p1) |
||
| 489 |
writeString(0x60, p0) |
||
| 490 |
} |
||
| 491 |
_sendLogPayload(0x1c, 0x84); |
||
| 492 |
assembly {
|
||
| 493 |
mstore(0x00, m0) |
||
| 494 |
mstore(0x20, m1) |
||
| 495 |
mstore(0x40, m2) |
||
| 496 |
mstore(0x60, m3) |
||
| 497 |
mstore(0x80, m4) |
||
| 498 |
} |
||
| 499 |
} |
||
| 500 | |||
| 501 |
function log(bytes32 p0, bool p1) internal pure {
|
||
| 502 |
bytes32 m0; |
||
| 503 |
bytes32 m1; |
||
| 504 |
bytes32 m2; |
||
| 505 |
bytes32 m3; |
||
| 506 |
bytes32 m4; |
||
| 507 |
assembly {
|
||
| 508 |
function writeString(pos, w) {
|
||
| 509 |
let length := 0 |
||
| 510 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 511 |
mstore(pos, length) |
||
| 512 |
let shift := sub(256, shl(3, length)) |
||
| 513 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 514 |
} |
||
| 515 |
m0 := mload(0x00) |
||
| 516 |
m1 := mload(0x20) |
||
| 517 |
m2 := mload(0x40) |
||
| 518 |
m3 := mload(0x60) |
||
| 519 |
m4 := mload(0x80) |
||
| 520 |
// Selector of `log(string,bool)`. |
||
| 521 |
mstore(0x00, 0xc3b55635) |
||
| 522 |
mstore(0x20, 0x40) |
||
| 523 |
mstore(0x40, p1) |
||
| 524 |
writeString(0x60, p0) |
||
| 525 |
} |
||
| 526 |
_sendLogPayload(0x1c, 0x84); |
||
| 527 |
assembly {
|
||
| 528 |
mstore(0x00, m0) |
||
| 529 |
mstore(0x20, m1) |
||
| 530 |
mstore(0x40, m2) |
||
| 531 |
mstore(0x60, m3) |
||
| 532 |
mstore(0x80, m4) |
||
| 533 |
} |
||
| 534 |
} |
||
| 535 | |||
| 536 |
function log(bytes32 p0, uint256 p1) internal pure {
|
||
| 537 |
bytes32 m0; |
||
| 538 |
bytes32 m1; |
||
| 539 |
bytes32 m2; |
||
| 540 |
bytes32 m3; |
||
| 541 |
bytes32 m4; |
||
| 542 |
assembly {
|
||
| 543 |
function writeString(pos, w) {
|
||
| 544 |
let length := 0 |
||
| 545 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 546 |
mstore(pos, length) |
||
| 547 |
let shift := sub(256, shl(3, length)) |
||
| 548 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 549 |
} |
||
| 550 |
m0 := mload(0x00) |
||
| 551 |
m1 := mload(0x20) |
||
| 552 |
m2 := mload(0x40) |
||
| 553 |
m3 := mload(0x60) |
||
| 554 |
m4 := mload(0x80) |
||
| 555 |
// Selector of `log(string,uint256)`. |
||
| 556 |
mstore(0x00, 0xb60e72cc) |
||
| 557 |
mstore(0x20, 0x40) |
||
| 558 |
mstore(0x40, p1) |
||
| 559 |
writeString(0x60, p0) |
||
| 560 |
} |
||
| 561 |
_sendLogPayload(0x1c, 0x84); |
||
| 562 |
assembly {
|
||
| 563 |
mstore(0x00, m0) |
||
| 564 |
mstore(0x20, m1) |
||
| 565 |
mstore(0x40, m2) |
||
| 566 |
mstore(0x60, m3) |
||
| 567 |
mstore(0x80, m4) |
||
| 568 |
} |
||
| 569 |
} |
||
| 570 | |||
| 571 |
function log(bytes32 p0, bytes32 p1) internal pure {
|
||
| 572 |
bytes32 m0; |
||
| 573 |
bytes32 m1; |
||
| 574 |
bytes32 m2; |
||
| 575 |
bytes32 m3; |
||
| 576 |
bytes32 m4; |
||
| 577 |
bytes32 m5; |
||
| 578 |
bytes32 m6; |
||
| 579 |
assembly {
|
||
| 580 |
function writeString(pos, w) {
|
||
| 581 |
let length := 0 |
||
| 582 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 583 |
mstore(pos, length) |
||
| 584 |
let shift := sub(256, shl(3, length)) |
||
| 585 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 586 |
} |
||
| 587 |
m0 := mload(0x00) |
||
| 588 |
m1 := mload(0x20) |
||
| 589 |
m2 := mload(0x40) |
||
| 590 |
m3 := mload(0x60) |
||
| 591 |
m4 := mload(0x80) |
||
| 592 |
m5 := mload(0xa0) |
||
| 593 |
m6 := mload(0xc0) |
||
| 594 |
// Selector of `log(string,string)`. |
||
| 595 |
mstore(0x00, 0x4b5c4277) |
||
| 596 |
mstore(0x20, 0x40) |
||
| 597 |
mstore(0x40, 0x80) |
||
| 598 |
writeString(0x60, p0) |
||
| 599 |
writeString(0xa0, p1) |
||
| 600 |
} |
||
| 601 |
_sendLogPayload(0x1c, 0xc4); |
||
| 602 |
assembly {
|
||
| 603 |
mstore(0x00, m0) |
||
| 604 |
mstore(0x20, m1) |
||
| 605 |
mstore(0x40, m2) |
||
| 606 |
mstore(0x60, m3) |
||
| 607 |
mstore(0x80, m4) |
||
| 608 |
mstore(0xa0, m5) |
||
| 609 |
mstore(0xc0, m6) |
||
| 610 |
} |
||
| 611 |
} |
||
| 612 | |||
| 613 |
function log(address p0, address p1, address p2) internal pure {
|
||
| 614 |
bytes32 m0; |
||
| 615 |
bytes32 m1; |
||
| 616 |
bytes32 m2; |
||
| 617 |
bytes32 m3; |
||
| 618 |
assembly {
|
||
| 619 |
m0 := mload(0x00) |
||
| 620 |
m1 := mload(0x20) |
||
| 621 |
m2 := mload(0x40) |
||
| 622 |
m3 := mload(0x60) |
||
| 623 |
// Selector of `log(address,address,address)`. |
||
| 624 |
mstore(0x00, 0x018c84c2) |
||
| 625 |
mstore(0x20, p0) |
||
| 626 |
mstore(0x40, p1) |
||
| 627 |
mstore(0x60, p2) |
||
| 628 |
} |
||
| 629 |
_sendLogPayload(0x1c, 0x64); |
||
| 630 |
assembly {
|
||
| 631 |
mstore(0x00, m0) |
||
| 632 |
mstore(0x20, m1) |
||
| 633 |
mstore(0x40, m2) |
||
| 634 |
mstore(0x60, m3) |
||
| 635 |
} |
||
| 636 |
} |
||
| 637 | |||
| 638 |
function log(address p0, address p1, bool p2) internal pure {
|
||
| 639 |
bytes32 m0; |
||
| 640 |
bytes32 m1; |
||
| 641 |
bytes32 m2; |
||
| 642 |
bytes32 m3; |
||
| 643 |
assembly {
|
||
| 644 |
m0 := mload(0x00) |
||
| 645 |
m1 := mload(0x20) |
||
| 646 |
m2 := mload(0x40) |
||
| 647 |
m3 := mload(0x60) |
||
| 648 |
// Selector of `log(address,address,bool)`. |
||
| 649 |
mstore(0x00, 0xf2a66286) |
||
| 650 |
mstore(0x20, p0) |
||
| 651 |
mstore(0x40, p1) |
||
| 652 |
mstore(0x60, p2) |
||
| 653 |
} |
||
| 654 |
_sendLogPayload(0x1c, 0x64); |
||
| 655 |
assembly {
|
||
| 656 |
mstore(0x00, m0) |
||
| 657 |
mstore(0x20, m1) |
||
| 658 |
mstore(0x40, m2) |
||
| 659 |
mstore(0x60, m3) |
||
| 660 |
} |
||
| 661 |
} |
||
| 662 | |||
| 663 |
function log(address p0, address p1, uint256 p2) internal pure {
|
||
| 664 |
bytes32 m0; |
||
| 665 |
bytes32 m1; |
||
| 666 |
bytes32 m2; |
||
| 667 |
bytes32 m3; |
||
| 668 |
assembly {
|
||
| 669 |
m0 := mload(0x00) |
||
| 670 |
m1 := mload(0x20) |
||
| 671 |
m2 := mload(0x40) |
||
| 672 |
m3 := mload(0x60) |
||
| 673 |
// Selector of `log(address,address,uint256)`. |
||
| 674 |
mstore(0x00, 0x17fe6185) |
||
| 675 |
mstore(0x20, p0) |
||
| 676 |
mstore(0x40, p1) |
||
| 677 |
mstore(0x60, p2) |
||
| 678 |
} |
||
| 679 |
_sendLogPayload(0x1c, 0x64); |
||
| 680 |
assembly {
|
||
| 681 |
mstore(0x00, m0) |
||
| 682 |
mstore(0x20, m1) |
||
| 683 |
mstore(0x40, m2) |
||
| 684 |
mstore(0x60, m3) |
||
| 685 |
} |
||
| 686 |
} |
||
| 687 | |||
| 688 |
function log(address p0, address p1, bytes32 p2) internal pure {
|
||
| 689 |
bytes32 m0; |
||
| 690 |
bytes32 m1; |
||
| 691 |
bytes32 m2; |
||
| 692 |
bytes32 m3; |
||
| 693 |
bytes32 m4; |
||
| 694 |
bytes32 m5; |
||
| 695 |
assembly {
|
||
| 696 |
function writeString(pos, w) {
|
||
| 697 |
let length := 0 |
||
| 698 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 699 |
mstore(pos, length) |
||
| 700 |
let shift := sub(256, shl(3, length)) |
||
| 701 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 702 |
} |
||
| 703 |
m0 := mload(0x00) |
||
| 704 |
m1 := mload(0x20) |
||
| 705 |
m2 := mload(0x40) |
||
| 706 |
m3 := mload(0x60) |
||
| 707 |
m4 := mload(0x80) |
||
| 708 |
m5 := mload(0xa0) |
||
| 709 |
// Selector of `log(address,address,string)`. |
||
| 710 |
mstore(0x00, 0x007150be) |
||
| 711 |
mstore(0x20, p0) |
||
| 712 |
mstore(0x40, p1) |
||
| 713 |
mstore(0x60, 0x60) |
||
| 714 |
writeString(0x80, p2) |
||
| 715 |
} |
||
| 716 |
_sendLogPayload(0x1c, 0xa4); |
||
| 717 |
assembly {
|
||
| 718 |
mstore(0x00, m0) |
||
| 719 |
mstore(0x20, m1) |
||
| 720 |
mstore(0x40, m2) |
||
| 721 |
mstore(0x60, m3) |
||
| 722 |
mstore(0x80, m4) |
||
| 723 |
mstore(0xa0, m5) |
||
| 724 |
} |
||
| 725 |
} |
||
| 726 | |||
| 727 |
function log(address p0, bool p1, address p2) internal pure {
|
||
| 728 |
bytes32 m0; |
||
| 729 |
bytes32 m1; |
||
| 730 |
bytes32 m2; |
||
| 731 |
bytes32 m3; |
||
| 732 |
assembly {
|
||
| 733 |
m0 := mload(0x00) |
||
| 734 |
m1 := mload(0x20) |
||
| 735 |
m2 := mload(0x40) |
||
| 736 |
m3 := mload(0x60) |
||
| 737 |
// Selector of `log(address,bool,address)`. |
||
| 738 |
mstore(0x00, 0xf11699ed) |
||
| 739 |
mstore(0x20, p0) |
||
| 740 |
mstore(0x40, p1) |
||
| 741 |
mstore(0x60, p2) |
||
| 742 |
} |
||
| 743 |
_sendLogPayload(0x1c, 0x64); |
||
| 744 |
assembly {
|
||
| 745 |
mstore(0x00, m0) |
||
| 746 |
mstore(0x20, m1) |
||
| 747 |
mstore(0x40, m2) |
||
| 748 |
mstore(0x60, m3) |
||
| 749 |
} |
||
| 750 |
} |
||
| 751 | |||
| 752 |
function log(address p0, bool p1, bool p2) internal pure {
|
||
| 753 |
bytes32 m0; |
||
| 754 |
bytes32 m1; |
||
| 755 |
bytes32 m2; |
||
| 756 |
bytes32 m3; |
||
| 757 |
assembly {
|
||
| 758 |
m0 := mload(0x00) |
||
| 759 |
m1 := mload(0x20) |
||
| 760 |
m2 := mload(0x40) |
||
| 761 |
m3 := mload(0x60) |
||
| 762 |
// Selector of `log(address,bool,bool)`. |
||
| 763 |
mstore(0x00, 0xeb830c92) |
||
| 764 |
mstore(0x20, p0) |
||
| 765 |
mstore(0x40, p1) |
||
| 766 |
mstore(0x60, p2) |
||
| 767 |
} |
||
| 768 |
_sendLogPayload(0x1c, 0x64); |
||
| 769 |
assembly {
|
||
| 770 |
mstore(0x00, m0) |
||
| 771 |
mstore(0x20, m1) |
||
| 772 |
mstore(0x40, m2) |
||
| 773 |
mstore(0x60, m3) |
||
| 774 |
} |
||
| 775 |
} |
||
| 776 | |||
| 777 |
function log(address p0, bool p1, uint256 p2) internal pure {
|
||
| 778 |
bytes32 m0; |
||
| 779 |
bytes32 m1; |
||
| 780 |
bytes32 m2; |
||
| 781 |
bytes32 m3; |
||
| 782 |
assembly {
|
||
| 783 |
m0 := mload(0x00) |
||
| 784 |
m1 := mload(0x20) |
||
| 785 |
m2 := mload(0x40) |
||
| 786 |
m3 := mload(0x60) |
||
| 787 |
// Selector of `log(address,bool,uint256)`. |
||
| 788 |
mstore(0x00, 0x9c4f99fb) |
||
| 789 |
mstore(0x20, p0) |
||
| 790 |
mstore(0x40, p1) |
||
| 791 |
mstore(0x60, p2) |
||
| 792 |
} |
||
| 793 |
_sendLogPayload(0x1c, 0x64); |
||
| 794 |
assembly {
|
||
| 795 |
mstore(0x00, m0) |
||
| 796 |
mstore(0x20, m1) |
||
| 797 |
mstore(0x40, m2) |
||
| 798 |
mstore(0x60, m3) |
||
| 799 |
} |
||
| 800 |
} |
||
| 801 | |||
| 802 |
function log(address p0, bool p1, bytes32 p2) internal pure {
|
||
| 803 |
bytes32 m0; |
||
| 804 |
bytes32 m1; |
||
| 805 |
bytes32 m2; |
||
| 806 |
bytes32 m3; |
||
| 807 |
bytes32 m4; |
||
| 808 |
bytes32 m5; |
||
| 809 |
assembly {
|
||
| 810 |
function writeString(pos, w) {
|
||
| 811 |
let length := 0 |
||
| 812 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 813 |
mstore(pos, length) |
||
| 814 |
let shift := sub(256, shl(3, length)) |
||
| 815 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 816 |
} |
||
| 817 |
m0 := mload(0x00) |
||
| 818 |
m1 := mload(0x20) |
||
| 819 |
m2 := mload(0x40) |
||
| 820 |
m3 := mload(0x60) |
||
| 821 |
m4 := mload(0x80) |
||
| 822 |
m5 := mload(0xa0) |
||
| 823 |
// Selector of `log(address,bool,string)`. |
||
| 824 |
mstore(0x00, 0x212255cc) |
||
| 825 |
mstore(0x20, p0) |
||
| 826 |
mstore(0x40, p1) |
||
| 827 |
mstore(0x60, 0x60) |
||
| 828 |
writeString(0x80, p2) |
||
| 829 |
} |
||
| 830 |
_sendLogPayload(0x1c, 0xa4); |
||
| 831 |
assembly {
|
||
| 832 |
mstore(0x00, m0) |
||
| 833 |
mstore(0x20, m1) |
||
| 834 |
mstore(0x40, m2) |
||
| 835 |
mstore(0x60, m3) |
||
| 836 |
mstore(0x80, m4) |
||
| 837 |
mstore(0xa0, m5) |
||
| 838 |
} |
||
| 839 |
} |
||
| 840 | |||
| 841 |
function log(address p0, uint256 p1, address p2) internal pure {
|
||
| 842 |
bytes32 m0; |
||
| 843 |
bytes32 m1; |
||
| 844 |
bytes32 m2; |
||
| 845 |
bytes32 m3; |
||
| 846 |
assembly {
|
||
| 847 |
m0 := mload(0x00) |
||
| 848 |
m1 := mload(0x20) |
||
| 849 |
m2 := mload(0x40) |
||
| 850 |
m3 := mload(0x60) |
||
| 851 |
// Selector of `log(address,uint256,address)`. |
||
| 852 |
mstore(0x00, 0x7bc0d848) |
||
| 853 |
mstore(0x20, p0) |
||
| 854 |
mstore(0x40, p1) |
||
| 855 |
mstore(0x60, p2) |
||
| 856 |
} |
||
| 857 |
_sendLogPayload(0x1c, 0x64); |
||
| 858 |
assembly {
|
||
| 859 |
mstore(0x00, m0) |
||
| 860 |
mstore(0x20, m1) |
||
| 861 |
mstore(0x40, m2) |
||
| 862 |
mstore(0x60, m3) |
||
| 863 |
} |
||
| 864 |
} |
||
| 865 | |||
| 866 |
function log(address p0, uint256 p1, bool p2) internal pure {
|
||
| 867 |
bytes32 m0; |
||
| 868 |
bytes32 m1; |
||
| 869 |
bytes32 m2; |
||
| 870 |
bytes32 m3; |
||
| 871 |
assembly {
|
||
| 872 |
m0 := mload(0x00) |
||
| 873 |
m1 := mload(0x20) |
||
| 874 |
m2 := mload(0x40) |
||
| 875 |
m3 := mload(0x60) |
||
| 876 |
// Selector of `log(address,uint256,bool)`. |
||
| 877 |
mstore(0x00, 0x678209a8) |
||
| 878 |
mstore(0x20, p0) |
||
| 879 |
mstore(0x40, p1) |
||
| 880 |
mstore(0x60, p2) |
||
| 881 |
} |
||
| 882 |
_sendLogPayload(0x1c, 0x64); |
||
| 883 |
assembly {
|
||
| 884 |
mstore(0x00, m0) |
||
| 885 |
mstore(0x20, m1) |
||
| 886 |
mstore(0x40, m2) |
||
| 887 |
mstore(0x60, m3) |
||
| 888 |
} |
||
| 889 |
} |
||
| 890 | |||
| 891 |
function log(address p0, uint256 p1, uint256 p2) internal pure {
|
||
| 892 |
bytes32 m0; |
||
| 893 |
bytes32 m1; |
||
| 894 |
bytes32 m2; |
||
| 895 |
bytes32 m3; |
||
| 896 |
assembly {
|
||
| 897 |
m0 := mload(0x00) |
||
| 898 |
m1 := mload(0x20) |
||
| 899 |
m2 := mload(0x40) |
||
| 900 |
m3 := mload(0x60) |
||
| 901 |
// Selector of `log(address,uint256,uint256)`. |
||
| 902 |
mstore(0x00, 0xb69bcaf6) |
||
| 903 |
mstore(0x20, p0) |
||
| 904 |
mstore(0x40, p1) |
||
| 905 |
mstore(0x60, p2) |
||
| 906 |
} |
||
| 907 |
_sendLogPayload(0x1c, 0x64); |
||
| 908 |
assembly {
|
||
| 909 |
mstore(0x00, m0) |
||
| 910 |
mstore(0x20, m1) |
||
| 911 |
mstore(0x40, m2) |
||
| 912 |
mstore(0x60, m3) |
||
| 913 |
} |
||
| 914 |
} |
||
| 915 | |||
| 916 |
function log(address p0, uint256 p1, bytes32 p2) internal pure {
|
||
| 917 |
bytes32 m0; |
||
| 918 |
bytes32 m1; |
||
| 919 |
bytes32 m2; |
||
| 920 |
bytes32 m3; |
||
| 921 |
bytes32 m4; |
||
| 922 |
bytes32 m5; |
||
| 923 |
assembly {
|
||
| 924 |
function writeString(pos, w) {
|
||
| 925 |
let length := 0 |
||
| 926 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 927 |
mstore(pos, length) |
||
| 928 |
let shift := sub(256, shl(3, length)) |
||
| 929 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 930 |
} |
||
| 931 |
m0 := mload(0x00) |
||
| 932 |
m1 := mload(0x20) |
||
| 933 |
m2 := mload(0x40) |
||
| 934 |
m3 := mload(0x60) |
||
| 935 |
m4 := mload(0x80) |
||
| 936 |
m5 := mload(0xa0) |
||
| 937 |
// Selector of `log(address,uint256,string)`. |
||
| 938 |
mstore(0x00, 0xa1f2e8aa) |
||
| 939 |
mstore(0x20, p0) |
||
| 940 |
mstore(0x40, p1) |
||
| 941 |
mstore(0x60, 0x60) |
||
| 942 |
writeString(0x80, p2) |
||
| 943 |
} |
||
| 944 |
_sendLogPayload(0x1c, 0xa4); |
||
| 945 |
assembly {
|
||
| 946 |
mstore(0x00, m0) |
||
| 947 |
mstore(0x20, m1) |
||
| 948 |
mstore(0x40, m2) |
||
| 949 |
mstore(0x60, m3) |
||
| 950 |
mstore(0x80, m4) |
||
| 951 |
mstore(0xa0, m5) |
||
| 952 |
} |
||
| 953 |
} |
||
| 954 | |||
| 955 |
function log(address p0, bytes32 p1, address p2) internal pure {
|
||
| 956 |
bytes32 m0; |
||
| 957 |
bytes32 m1; |
||
| 958 |
bytes32 m2; |
||
| 959 |
bytes32 m3; |
||
| 960 |
bytes32 m4; |
||
| 961 |
bytes32 m5; |
||
| 962 |
assembly {
|
||
| 963 |
function writeString(pos, w) {
|
||
| 964 |
let length := 0 |
||
| 965 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 966 |
mstore(pos, length) |
||
| 967 |
let shift := sub(256, shl(3, length)) |
||
| 968 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 969 |
} |
||
| 970 |
m0 := mload(0x00) |
||
| 971 |
m1 := mload(0x20) |
||
| 972 |
m2 := mload(0x40) |
||
| 973 |
m3 := mload(0x60) |
||
| 974 |
m4 := mload(0x80) |
||
| 975 |
m5 := mload(0xa0) |
||
| 976 |
// Selector of `log(address,string,address)`. |
||
| 977 |
mstore(0x00, 0xf08744e8) |
||
| 978 |
mstore(0x20, p0) |
||
| 979 |
mstore(0x40, 0x60) |
||
| 980 |
mstore(0x60, p2) |
||
| 981 |
writeString(0x80, p1) |
||
| 982 |
} |
||
| 983 |
_sendLogPayload(0x1c, 0xa4); |
||
| 984 |
assembly {
|
||
| 985 |
mstore(0x00, m0) |
||
| 986 |
mstore(0x20, m1) |
||
| 987 |
mstore(0x40, m2) |
||
| 988 |
mstore(0x60, m3) |
||
| 989 |
mstore(0x80, m4) |
||
| 990 |
mstore(0xa0, m5) |
||
| 991 |
} |
||
| 992 |
} |
||
| 993 | |||
| 994 |
function log(address p0, bytes32 p1, bool p2) internal pure {
|
||
| 995 |
bytes32 m0; |
||
| 996 |
bytes32 m1; |
||
| 997 |
bytes32 m2; |
||
| 998 |
bytes32 m3; |
||
| 999 |
bytes32 m4; |
||
| 1000 |
bytes32 m5; |
||
| 1001 |
assembly {
|
||
| 1002 |
function writeString(pos, w) {
|
||
| 1003 |
let length := 0 |
||
| 1004 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1005 |
mstore(pos, length) |
||
| 1006 |
let shift := sub(256, shl(3, length)) |
||
| 1007 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1008 |
} |
||
| 1009 |
m0 := mload(0x00) |
||
| 1010 |
m1 := mload(0x20) |
||
| 1011 |
m2 := mload(0x40) |
||
| 1012 |
m3 := mload(0x60) |
||
| 1013 |
m4 := mload(0x80) |
||
| 1014 |
m5 := mload(0xa0) |
||
| 1015 |
// Selector of `log(address,string,bool)`. |
||
| 1016 |
mstore(0x00, 0xcf020fb1) |
||
| 1017 |
mstore(0x20, p0) |
||
| 1018 |
mstore(0x40, 0x60) |
||
| 1019 |
mstore(0x60, p2) |
||
| 1020 |
writeString(0x80, p1) |
||
| 1021 |
} |
||
| 1022 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1023 |
assembly {
|
||
| 1024 |
mstore(0x00, m0) |
||
| 1025 |
mstore(0x20, m1) |
||
| 1026 |
mstore(0x40, m2) |
||
| 1027 |
mstore(0x60, m3) |
||
| 1028 |
mstore(0x80, m4) |
||
| 1029 |
mstore(0xa0, m5) |
||
| 1030 |
} |
||
| 1031 |
} |
||
| 1032 | |||
| 1033 |
function log(address p0, bytes32 p1, uint256 p2) internal pure {
|
||
| 1034 |
bytes32 m0; |
||
| 1035 |
bytes32 m1; |
||
| 1036 |
bytes32 m2; |
||
| 1037 |
bytes32 m3; |
||
| 1038 |
bytes32 m4; |
||
| 1039 |
bytes32 m5; |
||
| 1040 |
assembly {
|
||
| 1041 |
function writeString(pos, w) {
|
||
| 1042 |
let length := 0 |
||
| 1043 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1044 |
mstore(pos, length) |
||
| 1045 |
let shift := sub(256, shl(3, length)) |
||
| 1046 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1047 |
} |
||
| 1048 |
m0 := mload(0x00) |
||
| 1049 |
m1 := mload(0x20) |
||
| 1050 |
m2 := mload(0x40) |
||
| 1051 |
m3 := mload(0x60) |
||
| 1052 |
m4 := mload(0x80) |
||
| 1053 |
m5 := mload(0xa0) |
||
| 1054 |
// Selector of `log(address,string,uint256)`. |
||
| 1055 |
mstore(0x00, 0x67dd6ff1) |
||
| 1056 |
mstore(0x20, p0) |
||
| 1057 |
mstore(0x40, 0x60) |
||
| 1058 |
mstore(0x60, p2) |
||
| 1059 |
writeString(0x80, p1) |
||
| 1060 |
} |
||
| 1061 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1062 |
assembly {
|
||
| 1063 |
mstore(0x00, m0) |
||
| 1064 |
mstore(0x20, m1) |
||
| 1065 |
mstore(0x40, m2) |
||
| 1066 |
mstore(0x60, m3) |
||
| 1067 |
mstore(0x80, m4) |
||
| 1068 |
mstore(0xa0, m5) |
||
| 1069 |
} |
||
| 1070 |
} |
||
| 1071 | |||
| 1072 |
function log(address p0, bytes32 p1, bytes32 p2) internal pure {
|
||
| 1073 |
bytes32 m0; |
||
| 1074 |
bytes32 m1; |
||
| 1075 |
bytes32 m2; |
||
| 1076 |
bytes32 m3; |
||
| 1077 |
bytes32 m4; |
||
| 1078 |
bytes32 m5; |
||
| 1079 |
bytes32 m6; |
||
| 1080 |
bytes32 m7; |
||
| 1081 |
assembly {
|
||
| 1082 |
function writeString(pos, w) {
|
||
| 1083 |
let length := 0 |
||
| 1084 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1085 |
mstore(pos, length) |
||
| 1086 |
let shift := sub(256, shl(3, length)) |
||
| 1087 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1088 |
} |
||
| 1089 |
m0 := mload(0x00) |
||
| 1090 |
m1 := mload(0x20) |
||
| 1091 |
m2 := mload(0x40) |
||
| 1092 |
m3 := mload(0x60) |
||
| 1093 |
m4 := mload(0x80) |
||
| 1094 |
m5 := mload(0xa0) |
||
| 1095 |
m6 := mload(0xc0) |
||
| 1096 |
m7 := mload(0xe0) |
||
| 1097 |
// Selector of `log(address,string,string)`. |
||
| 1098 |
mstore(0x00, 0xfb772265) |
||
| 1099 |
mstore(0x20, p0) |
||
| 1100 |
mstore(0x40, 0x60) |
||
| 1101 |
mstore(0x60, 0xa0) |
||
| 1102 |
writeString(0x80, p1) |
||
| 1103 |
writeString(0xc0, p2) |
||
| 1104 |
} |
||
| 1105 |
_sendLogPayload(0x1c, 0xe4); |
||
| 1106 |
assembly {
|
||
| 1107 |
mstore(0x00, m0) |
||
| 1108 |
mstore(0x20, m1) |
||
| 1109 |
mstore(0x40, m2) |
||
| 1110 |
mstore(0x60, m3) |
||
| 1111 |
mstore(0x80, m4) |
||
| 1112 |
mstore(0xa0, m5) |
||
| 1113 |
mstore(0xc0, m6) |
||
| 1114 |
mstore(0xe0, m7) |
||
| 1115 |
} |
||
| 1116 |
} |
||
| 1117 | |||
| 1118 |
function log(bool p0, address p1, address p2) internal pure {
|
||
| 1119 |
bytes32 m0; |
||
| 1120 |
bytes32 m1; |
||
| 1121 |
bytes32 m2; |
||
| 1122 |
bytes32 m3; |
||
| 1123 |
assembly {
|
||
| 1124 |
m0 := mload(0x00) |
||
| 1125 |
m1 := mload(0x20) |
||
| 1126 |
m2 := mload(0x40) |
||
| 1127 |
m3 := mload(0x60) |
||
| 1128 |
// Selector of `log(bool,address,address)`. |
||
| 1129 |
mstore(0x00, 0xd2763667) |
||
| 1130 |
mstore(0x20, p0) |
||
| 1131 |
mstore(0x40, p1) |
||
| 1132 |
mstore(0x60, p2) |
||
| 1133 |
} |
||
| 1134 |
_sendLogPayload(0x1c, 0x64); |
||
| 1135 |
assembly {
|
||
| 1136 |
mstore(0x00, m0) |
||
| 1137 |
mstore(0x20, m1) |
||
| 1138 |
mstore(0x40, m2) |
||
| 1139 |
mstore(0x60, m3) |
||
| 1140 |
} |
||
| 1141 |
} |
||
| 1142 | |||
| 1143 |
function log(bool p0, address p1, bool p2) internal pure {
|
||
| 1144 |
bytes32 m0; |
||
| 1145 |
bytes32 m1; |
||
| 1146 |
bytes32 m2; |
||
| 1147 |
bytes32 m3; |
||
| 1148 |
assembly {
|
||
| 1149 |
m0 := mload(0x00) |
||
| 1150 |
m1 := mload(0x20) |
||
| 1151 |
m2 := mload(0x40) |
||
| 1152 |
m3 := mload(0x60) |
||
| 1153 |
// Selector of `log(bool,address,bool)`. |
||
| 1154 |
mstore(0x00, 0x18c9c746) |
||
| 1155 |
mstore(0x20, p0) |
||
| 1156 |
mstore(0x40, p1) |
||
| 1157 |
mstore(0x60, p2) |
||
| 1158 |
} |
||
| 1159 |
_sendLogPayload(0x1c, 0x64); |
||
| 1160 |
assembly {
|
||
| 1161 |
mstore(0x00, m0) |
||
| 1162 |
mstore(0x20, m1) |
||
| 1163 |
mstore(0x40, m2) |
||
| 1164 |
mstore(0x60, m3) |
||
| 1165 |
} |
||
| 1166 |
} |
||
| 1167 | |||
| 1168 |
function log(bool p0, address p1, uint256 p2) internal pure {
|
||
| 1169 |
bytes32 m0; |
||
| 1170 |
bytes32 m1; |
||
| 1171 |
bytes32 m2; |
||
| 1172 |
bytes32 m3; |
||
| 1173 |
assembly {
|
||
| 1174 |
m0 := mload(0x00) |
||
| 1175 |
m1 := mload(0x20) |
||
| 1176 |
m2 := mload(0x40) |
||
| 1177 |
m3 := mload(0x60) |
||
| 1178 |
// Selector of `log(bool,address,uint256)`. |
||
| 1179 |
mstore(0x00, 0x5f7b9afb) |
||
| 1180 |
mstore(0x20, p0) |
||
| 1181 |
mstore(0x40, p1) |
||
| 1182 |
mstore(0x60, p2) |
||
| 1183 |
} |
||
| 1184 |
_sendLogPayload(0x1c, 0x64); |
||
| 1185 |
assembly {
|
||
| 1186 |
mstore(0x00, m0) |
||
| 1187 |
mstore(0x20, m1) |
||
| 1188 |
mstore(0x40, m2) |
||
| 1189 |
mstore(0x60, m3) |
||
| 1190 |
} |
||
| 1191 |
} |
||
| 1192 | |||
| 1193 |
function log(bool p0, address p1, bytes32 p2) internal pure {
|
||
| 1194 |
bytes32 m0; |
||
| 1195 |
bytes32 m1; |
||
| 1196 |
bytes32 m2; |
||
| 1197 |
bytes32 m3; |
||
| 1198 |
bytes32 m4; |
||
| 1199 |
bytes32 m5; |
||
| 1200 |
assembly {
|
||
| 1201 |
function writeString(pos, w) {
|
||
| 1202 |
let length := 0 |
||
| 1203 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1204 |
mstore(pos, length) |
||
| 1205 |
let shift := sub(256, shl(3, length)) |
||
| 1206 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1207 |
} |
||
| 1208 |
m0 := mload(0x00) |
||
| 1209 |
m1 := mload(0x20) |
||
| 1210 |
m2 := mload(0x40) |
||
| 1211 |
m3 := mload(0x60) |
||
| 1212 |
m4 := mload(0x80) |
||
| 1213 |
m5 := mload(0xa0) |
||
| 1214 |
// Selector of `log(bool,address,string)`. |
||
| 1215 |
mstore(0x00, 0xde9a9270) |
||
| 1216 |
mstore(0x20, p0) |
||
| 1217 |
mstore(0x40, p1) |
||
| 1218 |
mstore(0x60, 0x60) |
||
| 1219 |
writeString(0x80, p2) |
||
| 1220 |
} |
||
| 1221 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1222 |
assembly {
|
||
| 1223 |
mstore(0x00, m0) |
||
| 1224 |
mstore(0x20, m1) |
||
| 1225 |
mstore(0x40, m2) |
||
| 1226 |
mstore(0x60, m3) |
||
| 1227 |
mstore(0x80, m4) |
||
| 1228 |
mstore(0xa0, m5) |
||
| 1229 |
} |
||
| 1230 |
} |
||
| 1231 | |||
| 1232 |
function log(bool p0, bool p1, address p2) internal pure {
|
||
| 1233 |
bytes32 m0; |
||
| 1234 |
bytes32 m1; |
||
| 1235 |
bytes32 m2; |
||
| 1236 |
bytes32 m3; |
||
| 1237 |
assembly {
|
||
| 1238 |
m0 := mload(0x00) |
||
| 1239 |
m1 := mload(0x20) |
||
| 1240 |
m2 := mload(0x40) |
||
| 1241 |
m3 := mload(0x60) |
||
| 1242 |
// Selector of `log(bool,bool,address)`. |
||
| 1243 |
mstore(0x00, 0x1078f68d) |
||
| 1244 |
mstore(0x20, p0) |
||
| 1245 |
mstore(0x40, p1) |
||
| 1246 |
mstore(0x60, p2) |
||
| 1247 |
} |
||
| 1248 |
_sendLogPayload(0x1c, 0x64); |
||
| 1249 |
assembly {
|
||
| 1250 |
mstore(0x00, m0) |
||
| 1251 |
mstore(0x20, m1) |
||
| 1252 |
mstore(0x40, m2) |
||
| 1253 |
mstore(0x60, m3) |
||
| 1254 |
} |
||
| 1255 |
} |
||
| 1256 | |||
| 1257 |
function log(bool p0, bool p1, bool p2) internal pure {
|
||
| 1258 |
bytes32 m0; |
||
| 1259 |
bytes32 m1; |
||
| 1260 |
bytes32 m2; |
||
| 1261 |
bytes32 m3; |
||
| 1262 |
assembly {
|
||
| 1263 |
m0 := mload(0x00) |
||
| 1264 |
m1 := mload(0x20) |
||
| 1265 |
m2 := mload(0x40) |
||
| 1266 |
m3 := mload(0x60) |
||
| 1267 |
// Selector of `log(bool,bool,bool)`. |
||
| 1268 |
mstore(0x00, 0x50709698) |
||
| 1269 |
mstore(0x20, p0) |
||
| 1270 |
mstore(0x40, p1) |
||
| 1271 |
mstore(0x60, p2) |
||
| 1272 |
} |
||
| 1273 |
_sendLogPayload(0x1c, 0x64); |
||
| 1274 |
assembly {
|
||
| 1275 |
mstore(0x00, m0) |
||
| 1276 |
mstore(0x20, m1) |
||
| 1277 |
mstore(0x40, m2) |
||
| 1278 |
mstore(0x60, m3) |
||
| 1279 |
} |
||
| 1280 |
} |
||
| 1281 | |||
| 1282 |
function log(bool p0, bool p1, uint256 p2) internal pure {
|
||
| 1283 |
bytes32 m0; |
||
| 1284 |
bytes32 m1; |
||
| 1285 |
bytes32 m2; |
||
| 1286 |
bytes32 m3; |
||
| 1287 |
assembly {
|
||
| 1288 |
m0 := mload(0x00) |
||
| 1289 |
m1 := mload(0x20) |
||
| 1290 |
m2 := mload(0x40) |
||
| 1291 |
m3 := mload(0x60) |
||
| 1292 |
// Selector of `log(bool,bool,uint256)`. |
||
| 1293 |
mstore(0x00, 0x12f21602) |
||
| 1294 |
mstore(0x20, p0) |
||
| 1295 |
mstore(0x40, p1) |
||
| 1296 |
mstore(0x60, p2) |
||
| 1297 |
} |
||
| 1298 |
_sendLogPayload(0x1c, 0x64); |
||
| 1299 |
assembly {
|
||
| 1300 |
mstore(0x00, m0) |
||
| 1301 |
mstore(0x20, m1) |
||
| 1302 |
mstore(0x40, m2) |
||
| 1303 |
mstore(0x60, m3) |
||
| 1304 |
} |
||
| 1305 |
} |
||
| 1306 | |||
| 1307 |
function log(bool p0, bool p1, bytes32 p2) internal pure {
|
||
| 1308 |
bytes32 m0; |
||
| 1309 |
bytes32 m1; |
||
| 1310 |
bytes32 m2; |
||
| 1311 |
bytes32 m3; |
||
| 1312 |
bytes32 m4; |
||
| 1313 |
bytes32 m5; |
||
| 1314 |
assembly {
|
||
| 1315 |
function writeString(pos, w) {
|
||
| 1316 |
let length := 0 |
||
| 1317 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1318 |
mstore(pos, length) |
||
| 1319 |
let shift := sub(256, shl(3, length)) |
||
| 1320 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1321 |
} |
||
| 1322 |
m0 := mload(0x00) |
||
| 1323 |
m1 := mload(0x20) |
||
| 1324 |
m2 := mload(0x40) |
||
| 1325 |
m3 := mload(0x60) |
||
| 1326 |
m4 := mload(0x80) |
||
| 1327 |
m5 := mload(0xa0) |
||
| 1328 |
// Selector of `log(bool,bool,string)`. |
||
| 1329 |
mstore(0x00, 0x2555fa46) |
||
| 1330 |
mstore(0x20, p0) |
||
| 1331 |
mstore(0x40, p1) |
||
| 1332 |
mstore(0x60, 0x60) |
||
| 1333 |
writeString(0x80, p2) |
||
| 1334 |
} |
||
| 1335 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1336 |
assembly {
|
||
| 1337 |
mstore(0x00, m0) |
||
| 1338 |
mstore(0x20, m1) |
||
| 1339 |
mstore(0x40, m2) |
||
| 1340 |
mstore(0x60, m3) |
||
| 1341 |
mstore(0x80, m4) |
||
| 1342 |
mstore(0xa0, m5) |
||
| 1343 |
} |
||
| 1344 |
} |
||
| 1345 | |||
| 1346 |
function log(bool p0, uint256 p1, address p2) internal pure {
|
||
| 1347 |
bytes32 m0; |
||
| 1348 |
bytes32 m1; |
||
| 1349 |
bytes32 m2; |
||
| 1350 |
bytes32 m3; |
||
| 1351 |
assembly {
|
||
| 1352 |
m0 := mload(0x00) |
||
| 1353 |
m1 := mload(0x20) |
||
| 1354 |
m2 := mload(0x40) |
||
| 1355 |
m3 := mload(0x60) |
||
| 1356 |
// Selector of `log(bool,uint256,address)`. |
||
| 1357 |
mstore(0x00, 0x088ef9d2) |
||
| 1358 |
mstore(0x20, p0) |
||
| 1359 |
mstore(0x40, p1) |
||
| 1360 |
mstore(0x60, p2) |
||
| 1361 |
} |
||
| 1362 |
_sendLogPayload(0x1c, 0x64); |
||
| 1363 |
assembly {
|
||
| 1364 |
mstore(0x00, m0) |
||
| 1365 |
mstore(0x20, m1) |
||
| 1366 |
mstore(0x40, m2) |
||
| 1367 |
mstore(0x60, m3) |
||
| 1368 |
} |
||
| 1369 |
} |
||
| 1370 | |||
| 1371 |
function log(bool p0, uint256 p1, bool p2) internal pure {
|
||
| 1372 |
bytes32 m0; |
||
| 1373 |
bytes32 m1; |
||
| 1374 |
bytes32 m2; |
||
| 1375 |
bytes32 m3; |
||
| 1376 |
assembly {
|
||
| 1377 |
m0 := mload(0x00) |
||
| 1378 |
m1 := mload(0x20) |
||
| 1379 |
m2 := mload(0x40) |
||
| 1380 |
m3 := mload(0x60) |
||
| 1381 |
// Selector of `log(bool,uint256,bool)`. |
||
| 1382 |
mstore(0x00, 0xe8defba9) |
||
| 1383 |
mstore(0x20, p0) |
||
| 1384 |
mstore(0x40, p1) |
||
| 1385 |
mstore(0x60, p2) |
||
| 1386 |
} |
||
| 1387 |
_sendLogPayload(0x1c, 0x64); |
||
| 1388 |
assembly {
|
||
| 1389 |
mstore(0x00, m0) |
||
| 1390 |
mstore(0x20, m1) |
||
| 1391 |
mstore(0x40, m2) |
||
| 1392 |
mstore(0x60, m3) |
||
| 1393 |
} |
||
| 1394 |
} |
||
| 1395 | |||
| 1396 |
function log(bool p0, uint256 p1, uint256 p2) internal pure {
|
||
| 1397 |
bytes32 m0; |
||
| 1398 |
bytes32 m1; |
||
| 1399 |
bytes32 m2; |
||
| 1400 |
bytes32 m3; |
||
| 1401 |
assembly {
|
||
| 1402 |
m0 := mload(0x00) |
||
| 1403 |
m1 := mload(0x20) |
||
| 1404 |
m2 := mload(0x40) |
||
| 1405 |
m3 := mload(0x60) |
||
| 1406 |
// Selector of `log(bool,uint256,uint256)`. |
||
| 1407 |
mstore(0x00, 0x37103367) |
||
| 1408 |
mstore(0x20, p0) |
||
| 1409 |
mstore(0x40, p1) |
||
| 1410 |
mstore(0x60, p2) |
||
| 1411 |
} |
||
| 1412 |
_sendLogPayload(0x1c, 0x64); |
||
| 1413 |
assembly {
|
||
| 1414 |
mstore(0x00, m0) |
||
| 1415 |
mstore(0x20, m1) |
||
| 1416 |
mstore(0x40, m2) |
||
| 1417 |
mstore(0x60, m3) |
||
| 1418 |
} |
||
| 1419 |
} |
||
| 1420 | |||
| 1421 |
function log(bool p0, uint256 p1, bytes32 p2) internal pure {
|
||
| 1422 |
bytes32 m0; |
||
| 1423 |
bytes32 m1; |
||
| 1424 |
bytes32 m2; |
||
| 1425 |
bytes32 m3; |
||
| 1426 |
bytes32 m4; |
||
| 1427 |
bytes32 m5; |
||
| 1428 |
assembly {
|
||
| 1429 |
function writeString(pos, w) {
|
||
| 1430 |
let length := 0 |
||
| 1431 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1432 |
mstore(pos, length) |
||
| 1433 |
let shift := sub(256, shl(3, length)) |
||
| 1434 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1435 |
} |
||
| 1436 |
m0 := mload(0x00) |
||
| 1437 |
m1 := mload(0x20) |
||
| 1438 |
m2 := mload(0x40) |
||
| 1439 |
m3 := mload(0x60) |
||
| 1440 |
m4 := mload(0x80) |
||
| 1441 |
m5 := mload(0xa0) |
||
| 1442 |
// Selector of `log(bool,uint256,string)`. |
||
| 1443 |
mstore(0x00, 0xc3fc3970) |
||
| 1444 |
mstore(0x20, p0) |
||
| 1445 |
mstore(0x40, p1) |
||
| 1446 |
mstore(0x60, 0x60) |
||
| 1447 |
writeString(0x80, p2) |
||
| 1448 |
} |
||
| 1449 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1450 |
assembly {
|
||
| 1451 |
mstore(0x00, m0) |
||
| 1452 |
mstore(0x20, m1) |
||
| 1453 |
mstore(0x40, m2) |
||
| 1454 |
mstore(0x60, m3) |
||
| 1455 |
mstore(0x80, m4) |
||
| 1456 |
mstore(0xa0, m5) |
||
| 1457 |
} |
||
| 1458 |
} |
||
| 1459 | |||
| 1460 |
function log(bool p0, bytes32 p1, address p2) internal pure {
|
||
| 1461 |
bytes32 m0; |
||
| 1462 |
bytes32 m1; |
||
| 1463 |
bytes32 m2; |
||
| 1464 |
bytes32 m3; |
||
| 1465 |
bytes32 m4; |
||
| 1466 |
bytes32 m5; |
||
| 1467 |
assembly {
|
||
| 1468 |
function writeString(pos, w) {
|
||
| 1469 |
let length := 0 |
||
| 1470 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1471 |
mstore(pos, length) |
||
| 1472 |
let shift := sub(256, shl(3, length)) |
||
| 1473 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1474 |
} |
||
| 1475 |
m0 := mload(0x00) |
||
| 1476 |
m1 := mload(0x20) |
||
| 1477 |
m2 := mload(0x40) |
||
| 1478 |
m3 := mload(0x60) |
||
| 1479 |
m4 := mload(0x80) |
||
| 1480 |
m5 := mload(0xa0) |
||
| 1481 |
// Selector of `log(bool,string,address)`. |
||
| 1482 |
mstore(0x00, 0x9591b953) |
||
| 1483 |
mstore(0x20, p0) |
||
| 1484 |
mstore(0x40, 0x60) |
||
| 1485 |
mstore(0x60, p2) |
||
| 1486 |
writeString(0x80, p1) |
||
| 1487 |
} |
||
| 1488 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1489 |
assembly {
|
||
| 1490 |
mstore(0x00, m0) |
||
| 1491 |
mstore(0x20, m1) |
||
| 1492 |
mstore(0x40, m2) |
||
| 1493 |
mstore(0x60, m3) |
||
| 1494 |
mstore(0x80, m4) |
||
| 1495 |
mstore(0xa0, m5) |
||
| 1496 |
} |
||
| 1497 |
} |
||
| 1498 | |||
| 1499 |
function log(bool p0, bytes32 p1, bool p2) internal pure {
|
||
| 1500 |
bytes32 m0; |
||
| 1501 |
bytes32 m1; |
||
| 1502 |
bytes32 m2; |
||
| 1503 |
bytes32 m3; |
||
| 1504 |
bytes32 m4; |
||
| 1505 |
bytes32 m5; |
||
| 1506 |
assembly {
|
||
| 1507 |
function writeString(pos, w) {
|
||
| 1508 |
let length := 0 |
||
| 1509 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1510 |
mstore(pos, length) |
||
| 1511 |
let shift := sub(256, shl(3, length)) |
||
| 1512 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1513 |
} |
||
| 1514 |
m0 := mload(0x00) |
||
| 1515 |
m1 := mload(0x20) |
||
| 1516 |
m2 := mload(0x40) |
||
| 1517 |
m3 := mload(0x60) |
||
| 1518 |
m4 := mload(0x80) |
||
| 1519 |
m5 := mload(0xa0) |
||
| 1520 |
// Selector of `log(bool,string,bool)`. |
||
| 1521 |
mstore(0x00, 0xdbb4c247) |
||
| 1522 |
mstore(0x20, p0) |
||
| 1523 |
mstore(0x40, 0x60) |
||
| 1524 |
mstore(0x60, p2) |
||
| 1525 |
writeString(0x80, p1) |
||
| 1526 |
} |
||
| 1527 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1528 |
assembly {
|
||
| 1529 |
mstore(0x00, m0) |
||
| 1530 |
mstore(0x20, m1) |
||
| 1531 |
mstore(0x40, m2) |
||
| 1532 |
mstore(0x60, m3) |
||
| 1533 |
mstore(0x80, m4) |
||
| 1534 |
mstore(0xa0, m5) |
||
| 1535 |
} |
||
| 1536 |
} |
||
| 1537 | |||
| 1538 |
function log(bool p0, bytes32 p1, uint256 p2) internal pure {
|
||
| 1539 |
bytes32 m0; |
||
| 1540 |
bytes32 m1; |
||
| 1541 |
bytes32 m2; |
||
| 1542 |
bytes32 m3; |
||
| 1543 |
bytes32 m4; |
||
| 1544 |
bytes32 m5; |
||
| 1545 |
assembly {
|
||
| 1546 |
function writeString(pos, w) {
|
||
| 1547 |
let length := 0 |
||
| 1548 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1549 |
mstore(pos, length) |
||
| 1550 |
let shift := sub(256, shl(3, length)) |
||
| 1551 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1552 |
} |
||
| 1553 |
m0 := mload(0x00) |
||
| 1554 |
m1 := mload(0x20) |
||
| 1555 |
m2 := mload(0x40) |
||
| 1556 |
m3 := mload(0x60) |
||
| 1557 |
m4 := mload(0x80) |
||
| 1558 |
m5 := mload(0xa0) |
||
| 1559 |
// Selector of `log(bool,string,uint256)`. |
||
| 1560 |
mstore(0x00, 0x1093ee11) |
||
| 1561 |
mstore(0x20, p0) |
||
| 1562 |
mstore(0x40, 0x60) |
||
| 1563 |
mstore(0x60, p2) |
||
| 1564 |
writeString(0x80, p1) |
||
| 1565 |
} |
||
| 1566 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1567 |
assembly {
|
||
| 1568 |
mstore(0x00, m0) |
||
| 1569 |
mstore(0x20, m1) |
||
| 1570 |
mstore(0x40, m2) |
||
| 1571 |
mstore(0x60, m3) |
||
| 1572 |
mstore(0x80, m4) |
||
| 1573 |
mstore(0xa0, m5) |
||
| 1574 |
} |
||
| 1575 |
} |
||
| 1576 | |||
| 1577 |
function log(bool p0, bytes32 p1, bytes32 p2) internal pure {
|
||
| 1578 |
bytes32 m0; |
||
| 1579 |
bytes32 m1; |
||
| 1580 |
bytes32 m2; |
||
| 1581 |
bytes32 m3; |
||
| 1582 |
bytes32 m4; |
||
| 1583 |
bytes32 m5; |
||
| 1584 |
bytes32 m6; |
||
| 1585 |
bytes32 m7; |
||
| 1586 |
assembly {
|
||
| 1587 |
function writeString(pos, w) {
|
||
| 1588 |
let length := 0 |
||
| 1589 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1590 |
mstore(pos, length) |
||
| 1591 |
let shift := sub(256, shl(3, length)) |
||
| 1592 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1593 |
} |
||
| 1594 |
m0 := mload(0x00) |
||
| 1595 |
m1 := mload(0x20) |
||
| 1596 |
m2 := mload(0x40) |
||
| 1597 |
m3 := mload(0x60) |
||
| 1598 |
m4 := mload(0x80) |
||
| 1599 |
m5 := mload(0xa0) |
||
| 1600 |
m6 := mload(0xc0) |
||
| 1601 |
m7 := mload(0xe0) |
||
| 1602 |
// Selector of `log(bool,string,string)`. |
||
| 1603 |
mstore(0x00, 0xb076847f) |
||
| 1604 |
mstore(0x20, p0) |
||
| 1605 |
mstore(0x40, 0x60) |
||
| 1606 |
mstore(0x60, 0xa0) |
||
| 1607 |
writeString(0x80, p1) |
||
| 1608 |
writeString(0xc0, p2) |
||
| 1609 |
} |
||
| 1610 |
_sendLogPayload(0x1c, 0xe4); |
||
| 1611 |
assembly {
|
||
| 1612 |
mstore(0x00, m0) |
||
| 1613 |
mstore(0x20, m1) |
||
| 1614 |
mstore(0x40, m2) |
||
| 1615 |
mstore(0x60, m3) |
||
| 1616 |
mstore(0x80, m4) |
||
| 1617 |
mstore(0xa0, m5) |
||
| 1618 |
mstore(0xc0, m6) |
||
| 1619 |
mstore(0xe0, m7) |
||
| 1620 |
} |
||
| 1621 |
} |
||
| 1622 | |||
| 1623 |
function log(uint256 p0, address p1, address p2) internal pure {
|
||
| 1624 |
bytes32 m0; |
||
| 1625 |
bytes32 m1; |
||
| 1626 |
bytes32 m2; |
||
| 1627 |
bytes32 m3; |
||
| 1628 |
assembly {
|
||
| 1629 |
m0 := mload(0x00) |
||
| 1630 |
m1 := mload(0x20) |
||
| 1631 |
m2 := mload(0x40) |
||
| 1632 |
m3 := mload(0x60) |
||
| 1633 |
// Selector of `log(uint256,address,address)`. |
||
| 1634 |
mstore(0x00, 0xbcfd9be0) |
||
| 1635 |
mstore(0x20, p0) |
||
| 1636 |
mstore(0x40, p1) |
||
| 1637 |
mstore(0x60, p2) |
||
| 1638 |
} |
||
| 1639 |
_sendLogPayload(0x1c, 0x64); |
||
| 1640 |
assembly {
|
||
| 1641 |
mstore(0x00, m0) |
||
| 1642 |
mstore(0x20, m1) |
||
| 1643 |
mstore(0x40, m2) |
||
| 1644 |
mstore(0x60, m3) |
||
| 1645 |
} |
||
| 1646 |
} |
||
| 1647 | |||
| 1648 |
function log(uint256 p0, address p1, bool p2) internal pure {
|
||
| 1649 |
bytes32 m0; |
||
| 1650 |
bytes32 m1; |
||
| 1651 |
bytes32 m2; |
||
| 1652 |
bytes32 m3; |
||
| 1653 |
assembly {
|
||
| 1654 |
m0 := mload(0x00) |
||
| 1655 |
m1 := mload(0x20) |
||
| 1656 |
m2 := mload(0x40) |
||
| 1657 |
m3 := mload(0x60) |
||
| 1658 |
// Selector of `log(uint256,address,bool)`. |
||
| 1659 |
mstore(0x00, 0x9b6ec042) |
||
| 1660 |
mstore(0x20, p0) |
||
| 1661 |
mstore(0x40, p1) |
||
| 1662 |
mstore(0x60, p2) |
||
| 1663 |
} |
||
| 1664 |
_sendLogPayload(0x1c, 0x64); |
||
| 1665 |
assembly {
|
||
| 1666 |
mstore(0x00, m0) |
||
| 1667 |
mstore(0x20, m1) |
||
| 1668 |
mstore(0x40, m2) |
||
| 1669 |
mstore(0x60, m3) |
||
| 1670 |
} |
||
| 1671 |
} |
||
| 1672 | |||
| 1673 |
function log(uint256 p0, address p1, uint256 p2) internal pure {
|
||
| 1674 |
bytes32 m0; |
||
| 1675 |
bytes32 m1; |
||
| 1676 |
bytes32 m2; |
||
| 1677 |
bytes32 m3; |
||
| 1678 |
assembly {
|
||
| 1679 |
m0 := mload(0x00) |
||
| 1680 |
m1 := mload(0x20) |
||
| 1681 |
m2 := mload(0x40) |
||
| 1682 |
m3 := mload(0x60) |
||
| 1683 |
// Selector of `log(uint256,address,uint256)`. |
||
| 1684 |
mstore(0x00, 0x5a9b5ed5) |
||
| 1685 |
mstore(0x20, p0) |
||
| 1686 |
mstore(0x40, p1) |
||
| 1687 |
mstore(0x60, p2) |
||
| 1688 |
} |
||
| 1689 |
_sendLogPayload(0x1c, 0x64); |
||
| 1690 |
assembly {
|
||
| 1691 |
mstore(0x00, m0) |
||
| 1692 |
mstore(0x20, m1) |
||
| 1693 |
mstore(0x40, m2) |
||
| 1694 |
mstore(0x60, m3) |
||
| 1695 |
} |
||
| 1696 |
} |
||
| 1697 | |||
| 1698 |
function log(uint256 p0, address p1, bytes32 p2) internal pure {
|
||
| 1699 |
bytes32 m0; |
||
| 1700 |
bytes32 m1; |
||
| 1701 |
bytes32 m2; |
||
| 1702 |
bytes32 m3; |
||
| 1703 |
bytes32 m4; |
||
| 1704 |
bytes32 m5; |
||
| 1705 |
assembly {
|
||
| 1706 |
function writeString(pos, w) {
|
||
| 1707 |
let length := 0 |
||
| 1708 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1709 |
mstore(pos, length) |
||
| 1710 |
let shift := sub(256, shl(3, length)) |
||
| 1711 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1712 |
} |
||
| 1713 |
m0 := mload(0x00) |
||
| 1714 |
m1 := mload(0x20) |
||
| 1715 |
m2 := mload(0x40) |
||
| 1716 |
m3 := mload(0x60) |
||
| 1717 |
m4 := mload(0x80) |
||
| 1718 |
m5 := mload(0xa0) |
||
| 1719 |
// Selector of `log(uint256,address,string)`. |
||
| 1720 |
mstore(0x00, 0x63cb41f9) |
||
| 1721 |
mstore(0x20, p0) |
||
| 1722 |
mstore(0x40, p1) |
||
| 1723 |
mstore(0x60, 0x60) |
||
| 1724 |
writeString(0x80, p2) |
||
| 1725 |
} |
||
| 1726 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1727 |
assembly {
|
||
| 1728 |
mstore(0x00, m0) |
||
| 1729 |
mstore(0x20, m1) |
||
| 1730 |
mstore(0x40, m2) |
||
| 1731 |
mstore(0x60, m3) |
||
| 1732 |
mstore(0x80, m4) |
||
| 1733 |
mstore(0xa0, m5) |
||
| 1734 |
} |
||
| 1735 |
} |
||
| 1736 | |||
| 1737 |
function log(uint256 p0, bool p1, address p2) internal pure {
|
||
| 1738 |
bytes32 m0; |
||
| 1739 |
bytes32 m1; |
||
| 1740 |
bytes32 m2; |
||
| 1741 |
bytes32 m3; |
||
| 1742 |
assembly {
|
||
| 1743 |
m0 := mload(0x00) |
||
| 1744 |
m1 := mload(0x20) |
||
| 1745 |
m2 := mload(0x40) |
||
| 1746 |
m3 := mload(0x60) |
||
| 1747 |
// Selector of `log(uint256,bool,address)`. |
||
| 1748 |
mstore(0x00, 0x35085f7b) |
||
| 1749 |
mstore(0x20, p0) |
||
| 1750 |
mstore(0x40, p1) |
||
| 1751 |
mstore(0x60, p2) |
||
| 1752 |
} |
||
| 1753 |
_sendLogPayload(0x1c, 0x64); |
||
| 1754 |
assembly {
|
||
| 1755 |
mstore(0x00, m0) |
||
| 1756 |
mstore(0x20, m1) |
||
| 1757 |
mstore(0x40, m2) |
||
| 1758 |
mstore(0x60, m3) |
||
| 1759 |
} |
||
| 1760 |
} |
||
| 1761 | |||
| 1762 |
function log(uint256 p0, bool p1, bool p2) internal pure {
|
||
| 1763 |
bytes32 m0; |
||
| 1764 |
bytes32 m1; |
||
| 1765 |
bytes32 m2; |
||
| 1766 |
bytes32 m3; |
||
| 1767 |
assembly {
|
||
| 1768 |
m0 := mload(0x00) |
||
| 1769 |
m1 := mload(0x20) |
||
| 1770 |
m2 := mload(0x40) |
||
| 1771 |
m3 := mload(0x60) |
||
| 1772 |
// Selector of `log(uint256,bool,bool)`. |
||
| 1773 |
mstore(0x00, 0x20718650) |
||
| 1774 |
mstore(0x20, p0) |
||
| 1775 |
mstore(0x40, p1) |
||
| 1776 |
mstore(0x60, p2) |
||
| 1777 |
} |
||
| 1778 |
_sendLogPayload(0x1c, 0x64); |
||
| 1779 |
assembly {
|
||
| 1780 |
mstore(0x00, m0) |
||
| 1781 |
mstore(0x20, m1) |
||
| 1782 |
mstore(0x40, m2) |
||
| 1783 |
mstore(0x60, m3) |
||
| 1784 |
} |
||
| 1785 |
} |
||
| 1786 | |||
| 1787 |
function log(uint256 p0, bool p1, uint256 p2) internal pure {
|
||
| 1788 |
bytes32 m0; |
||
| 1789 |
bytes32 m1; |
||
| 1790 |
bytes32 m2; |
||
| 1791 |
bytes32 m3; |
||
| 1792 |
assembly {
|
||
| 1793 |
m0 := mload(0x00) |
||
| 1794 |
m1 := mload(0x20) |
||
| 1795 |
m2 := mload(0x40) |
||
| 1796 |
m3 := mload(0x60) |
||
| 1797 |
// Selector of `log(uint256,bool,uint256)`. |
||
| 1798 |
mstore(0x00, 0x20098014) |
||
| 1799 |
mstore(0x20, p0) |
||
| 1800 |
mstore(0x40, p1) |
||
| 1801 |
mstore(0x60, p2) |
||
| 1802 |
} |
||
| 1803 |
_sendLogPayload(0x1c, 0x64); |
||
| 1804 |
assembly {
|
||
| 1805 |
mstore(0x00, m0) |
||
| 1806 |
mstore(0x20, m1) |
||
| 1807 |
mstore(0x40, m2) |
||
| 1808 |
mstore(0x60, m3) |
||
| 1809 |
} |
||
| 1810 |
} |
||
| 1811 | |||
| 1812 |
function log(uint256 p0, bool p1, bytes32 p2) internal pure {
|
||
| 1813 |
bytes32 m0; |
||
| 1814 |
bytes32 m1; |
||
| 1815 |
bytes32 m2; |
||
| 1816 |
bytes32 m3; |
||
| 1817 |
bytes32 m4; |
||
| 1818 |
bytes32 m5; |
||
| 1819 |
assembly {
|
||
| 1820 |
function writeString(pos, w) {
|
||
| 1821 |
let length := 0 |
||
| 1822 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1823 |
mstore(pos, length) |
||
| 1824 |
let shift := sub(256, shl(3, length)) |
||
| 1825 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1826 |
} |
||
| 1827 |
m0 := mload(0x00) |
||
| 1828 |
m1 := mload(0x20) |
||
| 1829 |
m2 := mload(0x40) |
||
| 1830 |
m3 := mload(0x60) |
||
| 1831 |
m4 := mload(0x80) |
||
| 1832 |
m5 := mload(0xa0) |
||
| 1833 |
// Selector of `log(uint256,bool,string)`. |
||
| 1834 |
mstore(0x00, 0x85775021) |
||
| 1835 |
mstore(0x20, p0) |
||
| 1836 |
mstore(0x40, p1) |
||
| 1837 |
mstore(0x60, 0x60) |
||
| 1838 |
writeString(0x80, p2) |
||
| 1839 |
} |
||
| 1840 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1841 |
assembly {
|
||
| 1842 |
mstore(0x00, m0) |
||
| 1843 |
mstore(0x20, m1) |
||
| 1844 |
mstore(0x40, m2) |
||
| 1845 |
mstore(0x60, m3) |
||
| 1846 |
mstore(0x80, m4) |
||
| 1847 |
mstore(0xa0, m5) |
||
| 1848 |
} |
||
| 1849 |
} |
||
| 1850 | |||
| 1851 |
function log(uint256 p0, uint256 p1, address p2) internal pure {
|
||
| 1852 |
bytes32 m0; |
||
| 1853 |
bytes32 m1; |
||
| 1854 |
bytes32 m2; |
||
| 1855 |
bytes32 m3; |
||
| 1856 |
assembly {
|
||
| 1857 |
m0 := mload(0x00) |
||
| 1858 |
m1 := mload(0x20) |
||
| 1859 |
m2 := mload(0x40) |
||
| 1860 |
m3 := mload(0x60) |
||
| 1861 |
// Selector of `log(uint256,uint256,address)`. |
||
| 1862 |
mstore(0x00, 0x5c96b331) |
||
| 1863 |
mstore(0x20, p0) |
||
| 1864 |
mstore(0x40, p1) |
||
| 1865 |
mstore(0x60, p2) |
||
| 1866 |
} |
||
| 1867 |
_sendLogPayload(0x1c, 0x64); |
||
| 1868 |
assembly {
|
||
| 1869 |
mstore(0x00, m0) |
||
| 1870 |
mstore(0x20, m1) |
||
| 1871 |
mstore(0x40, m2) |
||
| 1872 |
mstore(0x60, m3) |
||
| 1873 |
} |
||
| 1874 |
} |
||
| 1875 | |||
| 1876 |
function log(uint256 p0, uint256 p1, bool p2) internal pure {
|
||
| 1877 |
bytes32 m0; |
||
| 1878 |
bytes32 m1; |
||
| 1879 |
bytes32 m2; |
||
| 1880 |
bytes32 m3; |
||
| 1881 |
assembly {
|
||
| 1882 |
m0 := mload(0x00) |
||
| 1883 |
m1 := mload(0x20) |
||
| 1884 |
m2 := mload(0x40) |
||
| 1885 |
m3 := mload(0x60) |
||
| 1886 |
// Selector of `log(uint256,uint256,bool)`. |
||
| 1887 |
mstore(0x00, 0x4766da72) |
||
| 1888 |
mstore(0x20, p0) |
||
| 1889 |
mstore(0x40, p1) |
||
| 1890 |
mstore(0x60, p2) |
||
| 1891 |
} |
||
| 1892 |
_sendLogPayload(0x1c, 0x64); |
||
| 1893 |
assembly {
|
||
| 1894 |
mstore(0x00, m0) |
||
| 1895 |
mstore(0x20, m1) |
||
| 1896 |
mstore(0x40, m2) |
||
| 1897 |
mstore(0x60, m3) |
||
| 1898 |
} |
||
| 1899 |
} |
||
| 1900 | |||
| 1901 |
function log(uint256 p0, uint256 p1, uint256 p2) internal pure {
|
||
| 1902 |
bytes32 m0; |
||
| 1903 |
bytes32 m1; |
||
| 1904 |
bytes32 m2; |
||
| 1905 |
bytes32 m3; |
||
| 1906 |
assembly {
|
||
| 1907 |
m0 := mload(0x00) |
||
| 1908 |
m1 := mload(0x20) |
||
| 1909 |
m2 := mload(0x40) |
||
| 1910 |
m3 := mload(0x60) |
||
| 1911 |
// Selector of `log(uint256,uint256,uint256)`. |
||
| 1912 |
mstore(0x00, 0xd1ed7a3c) |
||
| 1913 |
mstore(0x20, p0) |
||
| 1914 |
mstore(0x40, p1) |
||
| 1915 |
mstore(0x60, p2) |
||
| 1916 |
} |
||
| 1917 |
_sendLogPayload(0x1c, 0x64); |
||
| 1918 |
assembly {
|
||
| 1919 |
mstore(0x00, m0) |
||
| 1920 |
mstore(0x20, m1) |
||
| 1921 |
mstore(0x40, m2) |
||
| 1922 |
mstore(0x60, m3) |
||
| 1923 |
} |
||
| 1924 |
} |
||
| 1925 | |||
| 1926 |
function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {
|
||
| 1927 |
bytes32 m0; |
||
| 1928 |
bytes32 m1; |
||
| 1929 |
bytes32 m2; |
||
| 1930 |
bytes32 m3; |
||
| 1931 |
bytes32 m4; |
||
| 1932 |
bytes32 m5; |
||
| 1933 |
assembly {
|
||
| 1934 |
function writeString(pos, w) {
|
||
| 1935 |
let length := 0 |
||
| 1936 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1937 |
mstore(pos, length) |
||
| 1938 |
let shift := sub(256, shl(3, length)) |
||
| 1939 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1940 |
} |
||
| 1941 |
m0 := mload(0x00) |
||
| 1942 |
m1 := mload(0x20) |
||
| 1943 |
m2 := mload(0x40) |
||
| 1944 |
m3 := mload(0x60) |
||
| 1945 |
m4 := mload(0x80) |
||
| 1946 |
m5 := mload(0xa0) |
||
| 1947 |
// Selector of `log(uint256,uint256,string)`. |
||
| 1948 |
mstore(0x00, 0x71d04af2) |
||
| 1949 |
mstore(0x20, p0) |
||
| 1950 |
mstore(0x40, p1) |
||
| 1951 |
mstore(0x60, 0x60) |
||
| 1952 |
writeString(0x80, p2) |
||
| 1953 |
} |
||
| 1954 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1955 |
assembly {
|
||
| 1956 |
mstore(0x00, m0) |
||
| 1957 |
mstore(0x20, m1) |
||
| 1958 |
mstore(0x40, m2) |
||
| 1959 |
mstore(0x60, m3) |
||
| 1960 |
mstore(0x80, m4) |
||
| 1961 |
mstore(0xa0, m5) |
||
| 1962 |
} |
||
| 1963 |
} |
||
| 1964 | |||
| 1965 |
function log(uint256 p0, bytes32 p1, address p2) internal pure {
|
||
| 1966 |
bytes32 m0; |
||
| 1967 |
bytes32 m1; |
||
| 1968 |
bytes32 m2; |
||
| 1969 |
bytes32 m3; |
||
| 1970 |
bytes32 m4; |
||
| 1971 |
bytes32 m5; |
||
| 1972 |
assembly {
|
||
| 1973 |
function writeString(pos, w) {
|
||
| 1974 |
let length := 0 |
||
| 1975 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 1976 |
mstore(pos, length) |
||
| 1977 |
let shift := sub(256, shl(3, length)) |
||
| 1978 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 1979 |
} |
||
| 1980 |
m0 := mload(0x00) |
||
| 1981 |
m1 := mload(0x20) |
||
| 1982 |
m2 := mload(0x40) |
||
| 1983 |
m3 := mload(0x60) |
||
| 1984 |
m4 := mload(0x80) |
||
| 1985 |
m5 := mload(0xa0) |
||
| 1986 |
// Selector of `log(uint256,string,address)`. |
||
| 1987 |
mstore(0x00, 0x7afac959) |
||
| 1988 |
mstore(0x20, p0) |
||
| 1989 |
mstore(0x40, 0x60) |
||
| 1990 |
mstore(0x60, p2) |
||
| 1991 |
writeString(0x80, p1) |
||
| 1992 |
} |
||
| 1993 |
_sendLogPayload(0x1c, 0xa4); |
||
| 1994 |
assembly {
|
||
| 1995 |
mstore(0x00, m0) |
||
| 1996 |
mstore(0x20, m1) |
||
| 1997 |
mstore(0x40, m2) |
||
| 1998 |
mstore(0x60, m3) |
||
| 1999 |
mstore(0x80, m4) |
||
| 2000 |
mstore(0xa0, m5) |
||
| 2001 |
} |
||
| 2002 |
} |
||
| 2003 | |||
| 2004 |
function log(uint256 p0, bytes32 p1, bool p2) internal pure {
|
||
| 2005 |
bytes32 m0; |
||
| 2006 |
bytes32 m1; |
||
| 2007 |
bytes32 m2; |
||
| 2008 |
bytes32 m3; |
||
| 2009 |
bytes32 m4; |
||
| 2010 |
bytes32 m5; |
||
| 2011 |
assembly {
|
||
| 2012 |
function writeString(pos, w) {
|
||
| 2013 |
let length := 0 |
||
| 2014 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2015 |
mstore(pos, length) |
||
| 2016 |
let shift := sub(256, shl(3, length)) |
||
| 2017 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2018 |
} |
||
| 2019 |
m0 := mload(0x00) |
||
| 2020 |
m1 := mload(0x20) |
||
| 2021 |
m2 := mload(0x40) |
||
| 2022 |
m3 := mload(0x60) |
||
| 2023 |
m4 := mload(0x80) |
||
| 2024 |
m5 := mload(0xa0) |
||
| 2025 |
// Selector of `log(uint256,string,bool)`. |
||
| 2026 |
mstore(0x00, 0x4ceda75a) |
||
| 2027 |
mstore(0x20, p0) |
||
| 2028 |
mstore(0x40, 0x60) |
||
| 2029 |
mstore(0x60, p2) |
||
| 2030 |
writeString(0x80, p1) |
||
| 2031 |
} |
||
| 2032 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2033 |
assembly {
|
||
| 2034 |
mstore(0x00, m0) |
||
| 2035 |
mstore(0x20, m1) |
||
| 2036 |
mstore(0x40, m2) |
||
| 2037 |
mstore(0x60, m3) |
||
| 2038 |
mstore(0x80, m4) |
||
| 2039 |
mstore(0xa0, m5) |
||
| 2040 |
} |
||
| 2041 |
} |
||
| 2042 | |||
| 2043 |
function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {
|
||
| 2044 |
bytes32 m0; |
||
| 2045 |
bytes32 m1; |
||
| 2046 |
bytes32 m2; |
||
| 2047 |
bytes32 m3; |
||
| 2048 |
bytes32 m4; |
||
| 2049 |
bytes32 m5; |
||
| 2050 |
assembly {
|
||
| 2051 |
function writeString(pos, w) {
|
||
| 2052 |
let length := 0 |
||
| 2053 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2054 |
mstore(pos, length) |
||
| 2055 |
let shift := sub(256, shl(3, length)) |
||
| 2056 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2057 |
} |
||
| 2058 |
m0 := mload(0x00) |
||
| 2059 |
m1 := mload(0x20) |
||
| 2060 |
m2 := mload(0x40) |
||
| 2061 |
m3 := mload(0x60) |
||
| 2062 |
m4 := mload(0x80) |
||
| 2063 |
m5 := mload(0xa0) |
||
| 2064 |
// Selector of `log(uint256,string,uint256)`. |
||
| 2065 |
mstore(0x00, 0x37aa7d4c) |
||
| 2066 |
mstore(0x20, p0) |
||
| 2067 |
mstore(0x40, 0x60) |
||
| 2068 |
mstore(0x60, p2) |
||
| 2069 |
writeString(0x80, p1) |
||
| 2070 |
} |
||
| 2071 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2072 |
assembly {
|
||
| 2073 |
mstore(0x00, m0) |
||
| 2074 |
mstore(0x20, m1) |
||
| 2075 |
mstore(0x40, m2) |
||
| 2076 |
mstore(0x60, m3) |
||
| 2077 |
mstore(0x80, m4) |
||
| 2078 |
mstore(0xa0, m5) |
||
| 2079 |
} |
||
| 2080 |
} |
||
| 2081 | |||
| 2082 |
function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {
|
||
| 2083 |
bytes32 m0; |
||
| 2084 |
bytes32 m1; |
||
| 2085 |
bytes32 m2; |
||
| 2086 |
bytes32 m3; |
||
| 2087 |
bytes32 m4; |
||
| 2088 |
bytes32 m5; |
||
| 2089 |
bytes32 m6; |
||
| 2090 |
bytes32 m7; |
||
| 2091 |
assembly {
|
||
| 2092 |
function writeString(pos, w) {
|
||
| 2093 |
let length := 0 |
||
| 2094 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2095 |
mstore(pos, length) |
||
| 2096 |
let shift := sub(256, shl(3, length)) |
||
| 2097 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2098 |
} |
||
| 2099 |
m0 := mload(0x00) |
||
| 2100 |
m1 := mload(0x20) |
||
| 2101 |
m2 := mload(0x40) |
||
| 2102 |
m3 := mload(0x60) |
||
| 2103 |
m4 := mload(0x80) |
||
| 2104 |
m5 := mload(0xa0) |
||
| 2105 |
m6 := mload(0xc0) |
||
| 2106 |
m7 := mload(0xe0) |
||
| 2107 |
// Selector of `log(uint256,string,string)`. |
||
| 2108 |
mstore(0x00, 0xb115611f) |
||
| 2109 |
mstore(0x20, p0) |
||
| 2110 |
mstore(0x40, 0x60) |
||
| 2111 |
mstore(0x60, 0xa0) |
||
| 2112 |
writeString(0x80, p1) |
||
| 2113 |
writeString(0xc0, p2) |
||
| 2114 |
} |
||
| 2115 |
_sendLogPayload(0x1c, 0xe4); |
||
| 2116 |
assembly {
|
||
| 2117 |
mstore(0x00, m0) |
||
| 2118 |
mstore(0x20, m1) |
||
| 2119 |
mstore(0x40, m2) |
||
| 2120 |
mstore(0x60, m3) |
||
| 2121 |
mstore(0x80, m4) |
||
| 2122 |
mstore(0xa0, m5) |
||
| 2123 |
mstore(0xc0, m6) |
||
| 2124 |
mstore(0xe0, m7) |
||
| 2125 |
} |
||
| 2126 |
} |
||
| 2127 | |||
| 2128 |
function log(bytes32 p0, address p1, address p2) internal pure {
|
||
| 2129 |
bytes32 m0; |
||
| 2130 |
bytes32 m1; |
||
| 2131 |
bytes32 m2; |
||
| 2132 |
bytes32 m3; |
||
| 2133 |
bytes32 m4; |
||
| 2134 |
bytes32 m5; |
||
| 2135 |
assembly {
|
||
| 2136 |
function writeString(pos, w) {
|
||
| 2137 |
let length := 0 |
||
| 2138 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2139 |
mstore(pos, length) |
||
| 2140 |
let shift := sub(256, shl(3, length)) |
||
| 2141 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2142 |
} |
||
| 2143 |
m0 := mload(0x00) |
||
| 2144 |
m1 := mload(0x20) |
||
| 2145 |
m2 := mload(0x40) |
||
| 2146 |
m3 := mload(0x60) |
||
| 2147 |
m4 := mload(0x80) |
||
| 2148 |
m5 := mload(0xa0) |
||
| 2149 |
// Selector of `log(string,address,address)`. |
||
| 2150 |
mstore(0x00, 0xfcec75e0) |
||
| 2151 |
mstore(0x20, 0x60) |
||
| 2152 |
mstore(0x40, p1) |
||
| 2153 |
mstore(0x60, p2) |
||
| 2154 |
writeString(0x80, p0) |
||
| 2155 |
} |
||
| 2156 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2157 |
assembly {
|
||
| 2158 |
mstore(0x00, m0) |
||
| 2159 |
mstore(0x20, m1) |
||
| 2160 |
mstore(0x40, m2) |
||
| 2161 |
mstore(0x60, m3) |
||
| 2162 |
mstore(0x80, m4) |
||
| 2163 |
mstore(0xa0, m5) |
||
| 2164 |
} |
||
| 2165 |
} |
||
| 2166 | |||
| 2167 |
function log(bytes32 p0, address p1, bool p2) internal pure {
|
||
| 2168 |
bytes32 m0; |
||
| 2169 |
bytes32 m1; |
||
| 2170 |
bytes32 m2; |
||
| 2171 |
bytes32 m3; |
||
| 2172 |
bytes32 m4; |
||
| 2173 |
bytes32 m5; |
||
| 2174 |
assembly {
|
||
| 2175 |
function writeString(pos, w) {
|
||
| 2176 |
let length := 0 |
||
| 2177 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2178 |
mstore(pos, length) |
||
| 2179 |
let shift := sub(256, shl(3, length)) |
||
| 2180 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2181 |
} |
||
| 2182 |
m0 := mload(0x00) |
||
| 2183 |
m1 := mload(0x20) |
||
| 2184 |
m2 := mload(0x40) |
||
| 2185 |
m3 := mload(0x60) |
||
| 2186 |
m4 := mload(0x80) |
||
| 2187 |
m5 := mload(0xa0) |
||
| 2188 |
// Selector of `log(string,address,bool)`. |
||
| 2189 |
mstore(0x00, 0xc91d5ed4) |
||
| 2190 |
mstore(0x20, 0x60) |
||
| 2191 |
mstore(0x40, p1) |
||
| 2192 |
mstore(0x60, p2) |
||
| 2193 |
writeString(0x80, p0) |
||
| 2194 |
} |
||
| 2195 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2196 |
assembly {
|
||
| 2197 |
mstore(0x00, m0) |
||
| 2198 |
mstore(0x20, m1) |
||
| 2199 |
mstore(0x40, m2) |
||
| 2200 |
mstore(0x60, m3) |
||
| 2201 |
mstore(0x80, m4) |
||
| 2202 |
mstore(0xa0, m5) |
||
| 2203 |
} |
||
| 2204 |
} |
||
| 2205 | |||
| 2206 |
function log(bytes32 p0, address p1, uint256 p2) internal pure {
|
||
| 2207 |
bytes32 m0; |
||
| 2208 |
bytes32 m1; |
||
| 2209 |
bytes32 m2; |
||
| 2210 |
bytes32 m3; |
||
| 2211 |
bytes32 m4; |
||
| 2212 |
bytes32 m5; |
||
| 2213 |
assembly {
|
||
| 2214 |
function writeString(pos, w) {
|
||
| 2215 |
let length := 0 |
||
| 2216 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2217 |
mstore(pos, length) |
||
| 2218 |
let shift := sub(256, shl(3, length)) |
||
| 2219 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2220 |
} |
||
| 2221 |
m0 := mload(0x00) |
||
| 2222 |
m1 := mload(0x20) |
||
| 2223 |
m2 := mload(0x40) |
||
| 2224 |
m3 := mload(0x60) |
||
| 2225 |
m4 := mload(0x80) |
||
| 2226 |
m5 := mload(0xa0) |
||
| 2227 |
// Selector of `log(string,address,uint256)`. |
||
| 2228 |
mstore(0x00, 0x0d26b925) |
||
| 2229 |
mstore(0x20, 0x60) |
||
| 2230 |
mstore(0x40, p1) |
||
| 2231 |
mstore(0x60, p2) |
||
| 2232 |
writeString(0x80, p0) |
||
| 2233 |
} |
||
| 2234 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2235 |
assembly {
|
||
| 2236 |
mstore(0x00, m0) |
||
| 2237 |
mstore(0x20, m1) |
||
| 2238 |
mstore(0x40, m2) |
||
| 2239 |
mstore(0x60, m3) |
||
| 2240 |
mstore(0x80, m4) |
||
| 2241 |
mstore(0xa0, m5) |
||
| 2242 |
} |
||
| 2243 |
} |
||
| 2244 | |||
| 2245 |
function log(bytes32 p0, address p1, bytes32 p2) internal pure {
|
||
| 2246 |
bytes32 m0; |
||
| 2247 |
bytes32 m1; |
||
| 2248 |
bytes32 m2; |
||
| 2249 |
bytes32 m3; |
||
| 2250 |
bytes32 m4; |
||
| 2251 |
bytes32 m5; |
||
| 2252 |
bytes32 m6; |
||
| 2253 |
bytes32 m7; |
||
| 2254 |
assembly {
|
||
| 2255 |
function writeString(pos, w) {
|
||
| 2256 |
let length := 0 |
||
| 2257 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2258 |
mstore(pos, length) |
||
| 2259 |
let shift := sub(256, shl(3, length)) |
||
| 2260 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2261 |
} |
||
| 2262 |
m0 := mload(0x00) |
||
| 2263 |
m1 := mload(0x20) |
||
| 2264 |
m2 := mload(0x40) |
||
| 2265 |
m3 := mload(0x60) |
||
| 2266 |
m4 := mload(0x80) |
||
| 2267 |
m5 := mload(0xa0) |
||
| 2268 |
m6 := mload(0xc0) |
||
| 2269 |
m7 := mload(0xe0) |
||
| 2270 |
// Selector of `log(string,address,string)`. |
||
| 2271 |
mstore(0x00, 0xe0e9ad4f) |
||
| 2272 |
mstore(0x20, 0x60) |
||
| 2273 |
mstore(0x40, p1) |
||
| 2274 |
mstore(0x60, 0xa0) |
||
| 2275 |
writeString(0x80, p0) |
||
| 2276 |
writeString(0xc0, p2) |
||
| 2277 |
} |
||
| 2278 |
_sendLogPayload(0x1c, 0xe4); |
||
| 2279 |
assembly {
|
||
| 2280 |
mstore(0x00, m0) |
||
| 2281 |
mstore(0x20, m1) |
||
| 2282 |
mstore(0x40, m2) |
||
| 2283 |
mstore(0x60, m3) |
||
| 2284 |
mstore(0x80, m4) |
||
| 2285 |
mstore(0xa0, m5) |
||
| 2286 |
mstore(0xc0, m6) |
||
| 2287 |
mstore(0xe0, m7) |
||
| 2288 |
} |
||
| 2289 |
} |
||
| 2290 | |||
| 2291 |
function log(bytes32 p0, bool p1, address p2) internal pure {
|
||
| 2292 |
bytes32 m0; |
||
| 2293 |
bytes32 m1; |
||
| 2294 |
bytes32 m2; |
||
| 2295 |
bytes32 m3; |
||
| 2296 |
bytes32 m4; |
||
| 2297 |
bytes32 m5; |
||
| 2298 |
assembly {
|
||
| 2299 |
function writeString(pos, w) {
|
||
| 2300 |
let length := 0 |
||
| 2301 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2302 |
mstore(pos, length) |
||
| 2303 |
let shift := sub(256, shl(3, length)) |
||
| 2304 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2305 |
} |
||
| 2306 |
m0 := mload(0x00) |
||
| 2307 |
m1 := mload(0x20) |
||
| 2308 |
m2 := mload(0x40) |
||
| 2309 |
m3 := mload(0x60) |
||
| 2310 |
m4 := mload(0x80) |
||
| 2311 |
m5 := mload(0xa0) |
||
| 2312 |
// Selector of `log(string,bool,address)`. |
||
| 2313 |
mstore(0x00, 0x932bbb38) |
||
| 2314 |
mstore(0x20, 0x60) |
||
| 2315 |
mstore(0x40, p1) |
||
| 2316 |
mstore(0x60, p2) |
||
| 2317 |
writeString(0x80, p0) |
||
| 2318 |
} |
||
| 2319 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2320 |
assembly {
|
||
| 2321 |
mstore(0x00, m0) |
||
| 2322 |
mstore(0x20, m1) |
||
| 2323 |
mstore(0x40, m2) |
||
| 2324 |
mstore(0x60, m3) |
||
| 2325 |
mstore(0x80, m4) |
||
| 2326 |
mstore(0xa0, m5) |
||
| 2327 |
} |
||
| 2328 |
} |
||
| 2329 | |||
| 2330 |
function log(bytes32 p0, bool p1, bool p2) internal pure {
|
||
| 2331 |
bytes32 m0; |
||
| 2332 |
bytes32 m1; |
||
| 2333 |
bytes32 m2; |
||
| 2334 |
bytes32 m3; |
||
| 2335 |
bytes32 m4; |
||
| 2336 |
bytes32 m5; |
||
| 2337 |
assembly {
|
||
| 2338 |
function writeString(pos, w) {
|
||
| 2339 |
let length := 0 |
||
| 2340 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2341 |
mstore(pos, length) |
||
| 2342 |
let shift := sub(256, shl(3, length)) |
||
| 2343 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2344 |
} |
||
| 2345 |
m0 := mload(0x00) |
||
| 2346 |
m1 := mload(0x20) |
||
| 2347 |
m2 := mload(0x40) |
||
| 2348 |
m3 := mload(0x60) |
||
| 2349 |
m4 := mload(0x80) |
||
| 2350 |
m5 := mload(0xa0) |
||
| 2351 |
// Selector of `log(string,bool,bool)`. |
||
| 2352 |
mstore(0x00, 0x850b7ad6) |
||
| 2353 |
mstore(0x20, 0x60) |
||
| 2354 |
mstore(0x40, p1) |
||
| 2355 |
mstore(0x60, p2) |
||
| 2356 |
writeString(0x80, p0) |
||
| 2357 |
} |
||
| 2358 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2359 |
assembly {
|
||
| 2360 |
mstore(0x00, m0) |
||
| 2361 |
mstore(0x20, m1) |
||
| 2362 |
mstore(0x40, m2) |
||
| 2363 |
mstore(0x60, m3) |
||
| 2364 |
mstore(0x80, m4) |
||
| 2365 |
mstore(0xa0, m5) |
||
| 2366 |
} |
||
| 2367 |
} |
||
| 2368 | |||
| 2369 |
function log(bytes32 p0, bool p1, uint256 p2) internal pure {
|
||
| 2370 |
bytes32 m0; |
||
| 2371 |
bytes32 m1; |
||
| 2372 |
bytes32 m2; |
||
| 2373 |
bytes32 m3; |
||
| 2374 |
bytes32 m4; |
||
| 2375 |
bytes32 m5; |
||
| 2376 |
assembly {
|
||
| 2377 |
function writeString(pos, w) {
|
||
| 2378 |
let length := 0 |
||
| 2379 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2380 |
mstore(pos, length) |
||
| 2381 |
let shift := sub(256, shl(3, length)) |
||
| 2382 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2383 |
} |
||
| 2384 |
m0 := mload(0x00) |
||
| 2385 |
m1 := mload(0x20) |
||
| 2386 |
m2 := mload(0x40) |
||
| 2387 |
m3 := mload(0x60) |
||
| 2388 |
m4 := mload(0x80) |
||
| 2389 |
m5 := mload(0xa0) |
||
| 2390 |
// Selector of `log(string,bool,uint256)`. |
||
| 2391 |
mstore(0x00, 0xc95958d6) |
||
| 2392 |
mstore(0x20, 0x60) |
||
| 2393 |
mstore(0x40, p1) |
||
| 2394 |
mstore(0x60, p2) |
||
| 2395 |
writeString(0x80, p0) |
||
| 2396 |
} |
||
| 2397 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2398 |
assembly {
|
||
| 2399 |
mstore(0x00, m0) |
||
| 2400 |
mstore(0x20, m1) |
||
| 2401 |
mstore(0x40, m2) |
||
| 2402 |
mstore(0x60, m3) |
||
| 2403 |
mstore(0x80, m4) |
||
| 2404 |
mstore(0xa0, m5) |
||
| 2405 |
} |
||
| 2406 |
} |
||
| 2407 | |||
| 2408 |
function log(bytes32 p0, bool p1, bytes32 p2) internal pure {
|
||
| 2409 |
bytes32 m0; |
||
| 2410 |
bytes32 m1; |
||
| 2411 |
bytes32 m2; |
||
| 2412 |
bytes32 m3; |
||
| 2413 |
bytes32 m4; |
||
| 2414 |
bytes32 m5; |
||
| 2415 |
bytes32 m6; |
||
| 2416 |
bytes32 m7; |
||
| 2417 |
assembly {
|
||
| 2418 |
function writeString(pos, w) {
|
||
| 2419 |
let length := 0 |
||
| 2420 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2421 |
mstore(pos, length) |
||
| 2422 |
let shift := sub(256, shl(3, length)) |
||
| 2423 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2424 |
} |
||
| 2425 |
m0 := mload(0x00) |
||
| 2426 |
m1 := mload(0x20) |
||
| 2427 |
m2 := mload(0x40) |
||
| 2428 |
m3 := mload(0x60) |
||
| 2429 |
m4 := mload(0x80) |
||
| 2430 |
m5 := mload(0xa0) |
||
| 2431 |
m6 := mload(0xc0) |
||
| 2432 |
m7 := mload(0xe0) |
||
| 2433 |
// Selector of `log(string,bool,string)`. |
||
| 2434 |
mstore(0x00, 0xe298f47d) |
||
| 2435 |
mstore(0x20, 0x60) |
||
| 2436 |
mstore(0x40, p1) |
||
| 2437 |
mstore(0x60, 0xa0) |
||
| 2438 |
writeString(0x80, p0) |
||
| 2439 |
writeString(0xc0, p2) |
||
| 2440 |
} |
||
| 2441 |
_sendLogPayload(0x1c, 0xe4); |
||
| 2442 |
assembly {
|
||
| 2443 |
mstore(0x00, m0) |
||
| 2444 |
mstore(0x20, m1) |
||
| 2445 |
mstore(0x40, m2) |
||
| 2446 |
mstore(0x60, m3) |
||
| 2447 |
mstore(0x80, m4) |
||
| 2448 |
mstore(0xa0, m5) |
||
| 2449 |
mstore(0xc0, m6) |
||
| 2450 |
mstore(0xe0, m7) |
||
| 2451 |
} |
||
| 2452 |
} |
||
| 2453 | |||
| 2454 |
function log(bytes32 p0, uint256 p1, address p2) internal pure {
|
||
| 2455 |
bytes32 m0; |
||
| 2456 |
bytes32 m1; |
||
| 2457 |
bytes32 m2; |
||
| 2458 |
bytes32 m3; |
||
| 2459 |
bytes32 m4; |
||
| 2460 |
bytes32 m5; |
||
| 2461 |
assembly {
|
||
| 2462 |
function writeString(pos, w) {
|
||
| 2463 |
let length := 0 |
||
| 2464 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2465 |
mstore(pos, length) |
||
| 2466 |
let shift := sub(256, shl(3, length)) |
||
| 2467 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2468 |
} |
||
| 2469 |
m0 := mload(0x00) |
||
| 2470 |
m1 := mload(0x20) |
||
| 2471 |
m2 := mload(0x40) |
||
| 2472 |
m3 := mload(0x60) |
||
| 2473 |
m4 := mload(0x80) |
||
| 2474 |
m5 := mload(0xa0) |
||
| 2475 |
// Selector of `log(string,uint256,address)`. |
||
| 2476 |
mstore(0x00, 0x1c7ec448) |
||
| 2477 |
mstore(0x20, 0x60) |
||
| 2478 |
mstore(0x40, p1) |
||
| 2479 |
mstore(0x60, p2) |
||
| 2480 |
writeString(0x80, p0) |
||
| 2481 |
} |
||
| 2482 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2483 |
assembly {
|
||
| 2484 |
mstore(0x00, m0) |
||
| 2485 |
mstore(0x20, m1) |
||
| 2486 |
mstore(0x40, m2) |
||
| 2487 |
mstore(0x60, m3) |
||
| 2488 |
mstore(0x80, m4) |
||
| 2489 |
mstore(0xa0, m5) |
||
| 2490 |
} |
||
| 2491 |
} |
||
| 2492 | |||
| 2493 |
function log(bytes32 p0, uint256 p1, bool p2) internal pure {
|
||
| 2494 |
bytes32 m0; |
||
| 2495 |
bytes32 m1; |
||
| 2496 |
bytes32 m2; |
||
| 2497 |
bytes32 m3; |
||
| 2498 |
bytes32 m4; |
||
| 2499 |
bytes32 m5; |
||
| 2500 |
assembly {
|
||
| 2501 |
function writeString(pos, w) {
|
||
| 2502 |
let length := 0 |
||
| 2503 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2504 |
mstore(pos, length) |
||
| 2505 |
let shift := sub(256, shl(3, length)) |
||
| 2506 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2507 |
} |
||
| 2508 |
m0 := mload(0x00) |
||
| 2509 |
m1 := mload(0x20) |
||
| 2510 |
m2 := mload(0x40) |
||
| 2511 |
m3 := mload(0x60) |
||
| 2512 |
m4 := mload(0x80) |
||
| 2513 |
m5 := mload(0xa0) |
||
| 2514 |
// Selector of `log(string,uint256,bool)`. |
||
| 2515 |
mstore(0x00, 0xca7733b1) |
||
| 2516 |
mstore(0x20, 0x60) |
||
| 2517 |
mstore(0x40, p1) |
||
| 2518 |
mstore(0x60, p2) |
||
| 2519 |
writeString(0x80, p0) |
||
| 2520 |
} |
||
| 2521 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2522 |
assembly {
|
||
| 2523 |
mstore(0x00, m0) |
||
| 2524 |
mstore(0x20, m1) |
||
| 2525 |
mstore(0x40, m2) |
||
| 2526 |
mstore(0x60, m3) |
||
| 2527 |
mstore(0x80, m4) |
||
| 2528 |
mstore(0xa0, m5) |
||
| 2529 |
} |
||
| 2530 |
} |
||
| 2531 | |||
| 2532 |
function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {
|
||
| 2533 |
bytes32 m0; |
||
| 2534 |
bytes32 m1; |
||
| 2535 |
bytes32 m2; |
||
| 2536 |
bytes32 m3; |
||
| 2537 |
bytes32 m4; |
||
| 2538 |
bytes32 m5; |
||
| 2539 |
assembly {
|
||
| 2540 |
function writeString(pos, w) {
|
||
| 2541 |
let length := 0 |
||
| 2542 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2543 |
mstore(pos, length) |
||
| 2544 |
let shift := sub(256, shl(3, length)) |
||
| 2545 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2546 |
} |
||
| 2547 |
m0 := mload(0x00) |
||
| 2548 |
m1 := mload(0x20) |
||
| 2549 |
m2 := mload(0x40) |
||
| 2550 |
m3 := mload(0x60) |
||
| 2551 |
m4 := mload(0x80) |
||
| 2552 |
m5 := mload(0xa0) |
||
| 2553 |
// Selector of `log(string,uint256,uint256)`. |
||
| 2554 |
mstore(0x00, 0xca47c4eb) |
||
| 2555 |
mstore(0x20, 0x60) |
||
| 2556 |
mstore(0x40, p1) |
||
| 2557 |
mstore(0x60, p2) |
||
| 2558 |
writeString(0x80, p0) |
||
| 2559 |
} |
||
| 2560 |
_sendLogPayload(0x1c, 0xa4); |
||
| 2561 |
assembly {
|
||
| 2562 |
mstore(0x00, m0) |
||
| 2563 |
mstore(0x20, m1) |
||
| 2564 |
mstore(0x40, m2) |
||
| 2565 |
mstore(0x60, m3) |
||
| 2566 |
mstore(0x80, m4) |
||
| 2567 |
mstore(0xa0, m5) |
||
| 2568 |
} |
||
| 2569 |
} |
||
| 2570 | |||
| 2571 |
function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {
|
||
| 2572 |
bytes32 m0; |
||
| 2573 |
bytes32 m1; |
||
| 2574 |
bytes32 m2; |
||
| 2575 |
bytes32 m3; |
||
| 2576 |
bytes32 m4; |
||
| 2577 |
bytes32 m5; |
||
| 2578 |
bytes32 m6; |
||
| 2579 |
bytes32 m7; |
||
| 2580 |
assembly {
|
||
| 2581 |
function writeString(pos, w) {
|
||
| 2582 |
let length := 0 |
||
| 2583 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2584 |
mstore(pos, length) |
||
| 2585 |
let shift := sub(256, shl(3, length)) |
||
| 2586 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2587 |
} |
||
| 2588 |
m0 := mload(0x00) |
||
| 2589 |
m1 := mload(0x20) |
||
| 2590 |
m2 := mload(0x40) |
||
| 2591 |
m3 := mload(0x60) |
||
| 2592 |
m4 := mload(0x80) |
||
| 2593 |
m5 := mload(0xa0) |
||
| 2594 |
m6 := mload(0xc0) |
||
| 2595 |
m7 := mload(0xe0) |
||
| 2596 |
// Selector of `log(string,uint256,string)`. |
||
| 2597 |
mstore(0x00, 0x5970e089) |
||
| 2598 |
mstore(0x20, 0x60) |
||
| 2599 |
mstore(0x40, p1) |
||
| 2600 |
mstore(0x60, 0xa0) |
||
| 2601 |
writeString(0x80, p0) |
||
| 2602 |
writeString(0xc0, p2) |
||
| 2603 |
} |
||
| 2604 |
_sendLogPayload(0x1c, 0xe4); |
||
| 2605 |
assembly {
|
||
| 2606 |
mstore(0x00, m0) |
||
| 2607 |
mstore(0x20, m1) |
||
| 2608 |
mstore(0x40, m2) |
||
| 2609 |
mstore(0x60, m3) |
||
| 2610 |
mstore(0x80, m4) |
||
| 2611 |
mstore(0xa0, m5) |
||
| 2612 |
mstore(0xc0, m6) |
||
| 2613 |
mstore(0xe0, m7) |
||
| 2614 |
} |
||
| 2615 |
} |
||
| 2616 | |||
| 2617 |
function log(bytes32 p0, bytes32 p1, address p2) internal pure {
|
||
| 2618 |
bytes32 m0; |
||
| 2619 |
bytes32 m1; |
||
| 2620 |
bytes32 m2; |
||
| 2621 |
bytes32 m3; |
||
| 2622 |
bytes32 m4; |
||
| 2623 |
bytes32 m5; |
||
| 2624 |
bytes32 m6; |
||
| 2625 |
bytes32 m7; |
||
| 2626 |
assembly {
|
||
| 2627 |
function writeString(pos, w) {
|
||
| 2628 |
let length := 0 |
||
| 2629 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2630 |
mstore(pos, length) |
||
| 2631 |
let shift := sub(256, shl(3, length)) |
||
| 2632 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2633 |
} |
||
| 2634 |
m0 := mload(0x00) |
||
| 2635 |
m1 := mload(0x20) |
||
| 2636 |
m2 := mload(0x40) |
||
| 2637 |
m3 := mload(0x60) |
||
| 2638 |
m4 := mload(0x80) |
||
| 2639 |
m5 := mload(0xa0) |
||
| 2640 |
m6 := mload(0xc0) |
||
| 2641 |
m7 := mload(0xe0) |
||
| 2642 |
// Selector of `log(string,string,address)`. |
||
| 2643 |
mstore(0x00, 0x95ed0195) |
||
| 2644 |
mstore(0x20, 0x60) |
||
| 2645 |
mstore(0x40, 0xa0) |
||
| 2646 |
mstore(0x60, p2) |
||
| 2647 |
writeString(0x80, p0) |
||
| 2648 |
writeString(0xc0, p1) |
||
| 2649 |
} |
||
| 2650 |
_sendLogPayload(0x1c, 0xe4); |
||
| 2651 |
assembly {
|
||
| 2652 |
mstore(0x00, m0) |
||
| 2653 |
mstore(0x20, m1) |
||
| 2654 |
mstore(0x40, m2) |
||
| 2655 |
mstore(0x60, m3) |
||
| 2656 |
mstore(0x80, m4) |
||
| 2657 |
mstore(0xa0, m5) |
||
| 2658 |
mstore(0xc0, m6) |
||
| 2659 |
mstore(0xe0, m7) |
||
| 2660 |
} |
||
| 2661 |
} |
||
| 2662 | |||
| 2663 |
function log(bytes32 p0, bytes32 p1, bool p2) internal pure {
|
||
| 2664 |
bytes32 m0; |
||
| 2665 |
bytes32 m1; |
||
| 2666 |
bytes32 m2; |
||
| 2667 |
bytes32 m3; |
||
| 2668 |
bytes32 m4; |
||
| 2669 |
bytes32 m5; |
||
| 2670 |
bytes32 m6; |
||
| 2671 |
bytes32 m7; |
||
| 2672 |
assembly {
|
||
| 2673 |
function writeString(pos, w) {
|
||
| 2674 |
let length := 0 |
||
| 2675 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2676 |
mstore(pos, length) |
||
| 2677 |
let shift := sub(256, shl(3, length)) |
||
| 2678 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2679 |
} |
||
| 2680 |
m0 := mload(0x00) |
||
| 2681 |
m1 := mload(0x20) |
||
| 2682 |
m2 := mload(0x40) |
||
| 2683 |
m3 := mload(0x60) |
||
| 2684 |
m4 := mload(0x80) |
||
| 2685 |
m5 := mload(0xa0) |
||
| 2686 |
m6 := mload(0xc0) |
||
| 2687 |
m7 := mload(0xe0) |
||
| 2688 |
// Selector of `log(string,string,bool)`. |
||
| 2689 |
mstore(0x00, 0xb0e0f9b5) |
||
| 2690 |
mstore(0x20, 0x60) |
||
| 2691 |
mstore(0x40, 0xa0) |
||
| 2692 |
mstore(0x60, p2) |
||
| 2693 |
writeString(0x80, p0) |
||
| 2694 |
writeString(0xc0, p1) |
||
| 2695 |
} |
||
| 2696 |
_sendLogPayload(0x1c, 0xe4); |
||
| 2697 |
assembly {
|
||
| 2698 |
mstore(0x00, m0) |
||
| 2699 |
mstore(0x20, m1) |
||
| 2700 |
mstore(0x40, m2) |
||
| 2701 |
mstore(0x60, m3) |
||
| 2702 |
mstore(0x80, m4) |
||
| 2703 |
mstore(0xa0, m5) |
||
| 2704 |
mstore(0xc0, m6) |
||
| 2705 |
mstore(0xe0, m7) |
||
| 2706 |
} |
||
| 2707 |
} |
||
| 2708 | |||
| 2709 |
function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {
|
||
| 2710 |
bytes32 m0; |
||
| 2711 |
bytes32 m1; |
||
| 2712 |
bytes32 m2; |
||
| 2713 |
bytes32 m3; |
||
| 2714 |
bytes32 m4; |
||
| 2715 |
bytes32 m5; |
||
| 2716 |
bytes32 m6; |
||
| 2717 |
bytes32 m7; |
||
| 2718 |
assembly {
|
||
| 2719 |
function writeString(pos, w) {
|
||
| 2720 |
let length := 0 |
||
| 2721 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2722 |
mstore(pos, length) |
||
| 2723 |
let shift := sub(256, shl(3, length)) |
||
| 2724 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2725 |
} |
||
| 2726 |
m0 := mload(0x00) |
||
| 2727 |
m1 := mload(0x20) |
||
| 2728 |
m2 := mload(0x40) |
||
| 2729 |
m3 := mload(0x60) |
||
| 2730 |
m4 := mload(0x80) |
||
| 2731 |
m5 := mload(0xa0) |
||
| 2732 |
m6 := mload(0xc0) |
||
| 2733 |
m7 := mload(0xe0) |
||
| 2734 |
// Selector of `log(string,string,uint256)`. |
||
| 2735 |
mstore(0x00, 0x5821efa1) |
||
| 2736 |
mstore(0x20, 0x60) |
||
| 2737 |
mstore(0x40, 0xa0) |
||
| 2738 |
mstore(0x60, p2) |
||
| 2739 |
writeString(0x80, p0) |
||
| 2740 |
writeString(0xc0, p1) |
||
| 2741 |
} |
||
| 2742 |
_sendLogPayload(0x1c, 0xe4); |
||
| 2743 |
assembly {
|
||
| 2744 |
mstore(0x00, m0) |
||
| 2745 |
mstore(0x20, m1) |
||
| 2746 |
mstore(0x40, m2) |
||
| 2747 |
mstore(0x60, m3) |
||
| 2748 |
mstore(0x80, m4) |
||
| 2749 |
mstore(0xa0, m5) |
||
| 2750 |
mstore(0xc0, m6) |
||
| 2751 |
mstore(0xe0, m7) |
||
| 2752 |
} |
||
| 2753 |
} |
||
| 2754 | |||
| 2755 |
function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {
|
||
| 2756 |
bytes32 m0; |
||
| 2757 |
bytes32 m1; |
||
| 2758 |
bytes32 m2; |
||
| 2759 |
bytes32 m3; |
||
| 2760 |
bytes32 m4; |
||
| 2761 |
bytes32 m5; |
||
| 2762 |
bytes32 m6; |
||
| 2763 |
bytes32 m7; |
||
| 2764 |
bytes32 m8; |
||
| 2765 |
bytes32 m9; |
||
| 2766 |
assembly {
|
||
| 2767 |
function writeString(pos, w) {
|
||
| 2768 |
let length := 0 |
||
| 2769 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2770 |
mstore(pos, length) |
||
| 2771 |
let shift := sub(256, shl(3, length)) |
||
| 2772 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2773 |
} |
||
| 2774 |
m0 := mload(0x00) |
||
| 2775 |
m1 := mload(0x20) |
||
| 2776 |
m2 := mload(0x40) |
||
| 2777 |
m3 := mload(0x60) |
||
| 2778 |
m4 := mload(0x80) |
||
| 2779 |
m5 := mload(0xa0) |
||
| 2780 |
m6 := mload(0xc0) |
||
| 2781 |
m7 := mload(0xe0) |
||
| 2782 |
m8 := mload(0x100) |
||
| 2783 |
m9 := mload(0x120) |
||
| 2784 |
// Selector of `log(string,string,string)`. |
||
| 2785 |
mstore(0x00, 0x2ced7cef) |
||
| 2786 |
mstore(0x20, 0x60) |
||
| 2787 |
mstore(0x40, 0xa0) |
||
| 2788 |
mstore(0x60, 0xe0) |
||
| 2789 |
writeString(0x80, p0) |
||
| 2790 |
writeString(0xc0, p1) |
||
| 2791 |
writeString(0x100, p2) |
||
| 2792 |
} |
||
| 2793 |
_sendLogPayload(0x1c, 0x124); |
||
| 2794 |
assembly {
|
||
| 2795 |
mstore(0x00, m0) |
||
| 2796 |
mstore(0x20, m1) |
||
| 2797 |
mstore(0x40, m2) |
||
| 2798 |
mstore(0x60, m3) |
||
| 2799 |
mstore(0x80, m4) |
||
| 2800 |
mstore(0xa0, m5) |
||
| 2801 |
mstore(0xc0, m6) |
||
| 2802 |
mstore(0xe0, m7) |
||
| 2803 |
mstore(0x100, m8) |
||
| 2804 |
mstore(0x120, m9) |
||
| 2805 |
} |
||
| 2806 |
} |
||
| 2807 | |||
| 2808 |
function log(address p0, address p1, address p2, address p3) internal pure {
|
||
| 2809 |
bytes32 m0; |
||
| 2810 |
bytes32 m1; |
||
| 2811 |
bytes32 m2; |
||
| 2812 |
bytes32 m3; |
||
| 2813 |
bytes32 m4; |
||
| 2814 |
assembly {
|
||
| 2815 |
m0 := mload(0x00) |
||
| 2816 |
m1 := mload(0x20) |
||
| 2817 |
m2 := mload(0x40) |
||
| 2818 |
m3 := mload(0x60) |
||
| 2819 |
m4 := mload(0x80) |
||
| 2820 |
// Selector of `log(address,address,address,address)`. |
||
| 2821 |
mstore(0x00, 0x665bf134) |
||
| 2822 |
mstore(0x20, p0) |
||
| 2823 |
mstore(0x40, p1) |
||
| 2824 |
mstore(0x60, p2) |
||
| 2825 |
mstore(0x80, p3) |
||
| 2826 |
} |
||
| 2827 |
_sendLogPayload(0x1c, 0x84); |
||
| 2828 |
assembly {
|
||
| 2829 |
mstore(0x00, m0) |
||
| 2830 |
mstore(0x20, m1) |
||
| 2831 |
mstore(0x40, m2) |
||
| 2832 |
mstore(0x60, m3) |
||
| 2833 |
mstore(0x80, m4) |
||
| 2834 |
} |
||
| 2835 |
} |
||
| 2836 | |||
| 2837 |
function log(address p0, address p1, address p2, bool p3) internal pure {
|
||
| 2838 |
bytes32 m0; |
||
| 2839 |
bytes32 m1; |
||
| 2840 |
bytes32 m2; |
||
| 2841 |
bytes32 m3; |
||
| 2842 |
bytes32 m4; |
||
| 2843 |
assembly {
|
||
| 2844 |
m0 := mload(0x00) |
||
| 2845 |
m1 := mload(0x20) |
||
| 2846 |
m2 := mload(0x40) |
||
| 2847 |
m3 := mload(0x60) |
||
| 2848 |
m4 := mload(0x80) |
||
| 2849 |
// Selector of `log(address,address,address,bool)`. |
||
| 2850 |
mstore(0x00, 0x0e378994) |
||
| 2851 |
mstore(0x20, p0) |
||
| 2852 |
mstore(0x40, p1) |
||
| 2853 |
mstore(0x60, p2) |
||
| 2854 |
mstore(0x80, p3) |
||
| 2855 |
} |
||
| 2856 |
_sendLogPayload(0x1c, 0x84); |
||
| 2857 |
assembly {
|
||
| 2858 |
mstore(0x00, m0) |
||
| 2859 |
mstore(0x20, m1) |
||
| 2860 |
mstore(0x40, m2) |
||
| 2861 |
mstore(0x60, m3) |
||
| 2862 |
mstore(0x80, m4) |
||
| 2863 |
} |
||
| 2864 |
} |
||
| 2865 | |||
| 2866 |
function log(address p0, address p1, address p2, uint256 p3) internal pure {
|
||
| 2867 |
bytes32 m0; |
||
| 2868 |
bytes32 m1; |
||
| 2869 |
bytes32 m2; |
||
| 2870 |
bytes32 m3; |
||
| 2871 |
bytes32 m4; |
||
| 2872 |
assembly {
|
||
| 2873 |
m0 := mload(0x00) |
||
| 2874 |
m1 := mload(0x20) |
||
| 2875 |
m2 := mload(0x40) |
||
| 2876 |
m3 := mload(0x60) |
||
| 2877 |
m4 := mload(0x80) |
||
| 2878 |
// Selector of `log(address,address,address,uint256)`. |
||
| 2879 |
mstore(0x00, 0x94250d77) |
||
| 2880 |
mstore(0x20, p0) |
||
| 2881 |
mstore(0x40, p1) |
||
| 2882 |
mstore(0x60, p2) |
||
| 2883 |
mstore(0x80, p3) |
||
| 2884 |
} |
||
| 2885 |
_sendLogPayload(0x1c, 0x84); |
||
| 2886 |
assembly {
|
||
| 2887 |
mstore(0x00, m0) |
||
| 2888 |
mstore(0x20, m1) |
||
| 2889 |
mstore(0x40, m2) |
||
| 2890 |
mstore(0x60, m3) |
||
| 2891 |
mstore(0x80, m4) |
||
| 2892 |
} |
||
| 2893 |
} |
||
| 2894 | |||
| 2895 |
function log(address p0, address p1, address p2, bytes32 p3) internal pure {
|
||
| 2896 |
bytes32 m0; |
||
| 2897 |
bytes32 m1; |
||
| 2898 |
bytes32 m2; |
||
| 2899 |
bytes32 m3; |
||
| 2900 |
bytes32 m4; |
||
| 2901 |
bytes32 m5; |
||
| 2902 |
bytes32 m6; |
||
| 2903 |
assembly {
|
||
| 2904 |
function writeString(pos, w) {
|
||
| 2905 |
let length := 0 |
||
| 2906 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 2907 |
mstore(pos, length) |
||
| 2908 |
let shift := sub(256, shl(3, length)) |
||
| 2909 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 2910 |
} |
||
| 2911 |
m0 := mload(0x00) |
||
| 2912 |
m1 := mload(0x20) |
||
| 2913 |
m2 := mload(0x40) |
||
| 2914 |
m3 := mload(0x60) |
||
| 2915 |
m4 := mload(0x80) |
||
| 2916 |
m5 := mload(0xa0) |
||
| 2917 |
m6 := mload(0xc0) |
||
| 2918 |
// Selector of `log(address,address,address,string)`. |
||
| 2919 |
mstore(0x00, 0xf808da20) |
||
| 2920 |
mstore(0x20, p0) |
||
| 2921 |
mstore(0x40, p1) |
||
| 2922 |
mstore(0x60, p2) |
||
| 2923 |
mstore(0x80, 0x80) |
||
| 2924 |
writeString(0xa0, p3) |
||
| 2925 |
} |
||
| 2926 |
_sendLogPayload(0x1c, 0xc4); |
||
| 2927 |
assembly {
|
||
| 2928 |
mstore(0x00, m0) |
||
| 2929 |
mstore(0x20, m1) |
||
| 2930 |
mstore(0x40, m2) |
||
| 2931 |
mstore(0x60, m3) |
||
| 2932 |
mstore(0x80, m4) |
||
| 2933 |
mstore(0xa0, m5) |
||
| 2934 |
mstore(0xc0, m6) |
||
| 2935 |
} |
||
| 2936 |
} |
||
| 2937 | |||
| 2938 |
function log(address p0, address p1, bool p2, address p3) internal pure {
|
||
| 2939 |
bytes32 m0; |
||
| 2940 |
bytes32 m1; |
||
| 2941 |
bytes32 m2; |
||
| 2942 |
bytes32 m3; |
||
| 2943 |
bytes32 m4; |
||
| 2944 |
assembly {
|
||
| 2945 |
m0 := mload(0x00) |
||
| 2946 |
m1 := mload(0x20) |
||
| 2947 |
m2 := mload(0x40) |
||
| 2948 |
m3 := mload(0x60) |
||
| 2949 |
m4 := mload(0x80) |
||
| 2950 |
// Selector of `log(address,address,bool,address)`. |
||
| 2951 |
mstore(0x00, 0x9f1bc36e) |
||
| 2952 |
mstore(0x20, p0) |
||
| 2953 |
mstore(0x40, p1) |
||
| 2954 |
mstore(0x60, p2) |
||
| 2955 |
mstore(0x80, p3) |
||
| 2956 |
} |
||
| 2957 |
_sendLogPayload(0x1c, 0x84); |
||
| 2958 |
assembly {
|
||
| 2959 |
mstore(0x00, m0) |
||
| 2960 |
mstore(0x20, m1) |
||
| 2961 |
mstore(0x40, m2) |
||
| 2962 |
mstore(0x60, m3) |
||
| 2963 |
mstore(0x80, m4) |
||
| 2964 |
} |
||
| 2965 |
} |
||
| 2966 | |||
| 2967 |
function log(address p0, address p1, bool p2, bool p3) internal pure {
|
||
| 2968 |
bytes32 m0; |
||
| 2969 |
bytes32 m1; |
||
| 2970 |
bytes32 m2; |
||
| 2971 |
bytes32 m3; |
||
| 2972 |
bytes32 m4; |
||
| 2973 |
assembly {
|
||
| 2974 |
m0 := mload(0x00) |
||
| 2975 |
m1 := mload(0x20) |
||
| 2976 |
m2 := mload(0x40) |
||
| 2977 |
m3 := mload(0x60) |
||
| 2978 |
m4 := mload(0x80) |
||
| 2979 |
// Selector of `log(address,address,bool,bool)`. |
||
| 2980 |
mstore(0x00, 0x2cd4134a) |
||
| 2981 |
mstore(0x20, p0) |
||
| 2982 |
mstore(0x40, p1) |
||
| 2983 |
mstore(0x60, p2) |
||
| 2984 |
mstore(0x80, p3) |
||
| 2985 |
} |
||
| 2986 |
_sendLogPayload(0x1c, 0x84); |
||
| 2987 |
assembly {
|
||
| 2988 |
mstore(0x00, m0) |
||
| 2989 |
mstore(0x20, m1) |
||
| 2990 |
mstore(0x40, m2) |
||
| 2991 |
mstore(0x60, m3) |
||
| 2992 |
mstore(0x80, m4) |
||
| 2993 |
} |
||
| 2994 |
} |
||
| 2995 | |||
| 2996 |
function log(address p0, address p1, bool p2, uint256 p3) internal pure {
|
||
| 2997 |
bytes32 m0; |
||
| 2998 |
bytes32 m1; |
||
| 2999 |
bytes32 m2; |
||
| 3000 |
bytes32 m3; |
||
| 3001 |
bytes32 m4; |
||
| 3002 |
assembly {
|
||
| 3003 |
m0 := mload(0x00) |
||
| 3004 |
m1 := mload(0x20) |
||
| 3005 |
m2 := mload(0x40) |
||
| 3006 |
m3 := mload(0x60) |
||
| 3007 |
m4 := mload(0x80) |
||
| 3008 |
// Selector of `log(address,address,bool,uint256)`. |
||
| 3009 |
mstore(0x00, 0x3971e78c) |
||
| 3010 |
mstore(0x20, p0) |
||
| 3011 |
mstore(0x40, p1) |
||
| 3012 |
mstore(0x60, p2) |
||
| 3013 |
mstore(0x80, p3) |
||
| 3014 |
} |
||
| 3015 |
_sendLogPayload(0x1c, 0x84); |
||
| 3016 |
assembly {
|
||
| 3017 |
mstore(0x00, m0) |
||
| 3018 |
mstore(0x20, m1) |
||
| 3019 |
mstore(0x40, m2) |
||
| 3020 |
mstore(0x60, m3) |
||
| 3021 |
mstore(0x80, m4) |
||
| 3022 |
} |
||
| 3023 |
} |
||
| 3024 | |||
| 3025 |
function log(address p0, address p1, bool p2, bytes32 p3) internal pure {
|
||
| 3026 |
bytes32 m0; |
||
| 3027 |
bytes32 m1; |
||
| 3028 |
bytes32 m2; |
||
| 3029 |
bytes32 m3; |
||
| 3030 |
bytes32 m4; |
||
| 3031 |
bytes32 m5; |
||
| 3032 |
bytes32 m6; |
||
| 3033 |
assembly {
|
||
| 3034 |
function writeString(pos, w) {
|
||
| 3035 |
let length := 0 |
||
| 3036 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3037 |
mstore(pos, length) |
||
| 3038 |
let shift := sub(256, shl(3, length)) |
||
| 3039 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3040 |
} |
||
| 3041 |
m0 := mload(0x00) |
||
| 3042 |
m1 := mload(0x20) |
||
| 3043 |
m2 := mload(0x40) |
||
| 3044 |
m3 := mload(0x60) |
||
| 3045 |
m4 := mload(0x80) |
||
| 3046 |
m5 := mload(0xa0) |
||
| 3047 |
m6 := mload(0xc0) |
||
| 3048 |
// Selector of `log(address,address,bool,string)`. |
||
| 3049 |
mstore(0x00, 0xaa6540c8) |
||
| 3050 |
mstore(0x20, p0) |
||
| 3051 |
mstore(0x40, p1) |
||
| 3052 |
mstore(0x60, p2) |
||
| 3053 |
mstore(0x80, 0x80) |
||
| 3054 |
writeString(0xa0, p3) |
||
| 3055 |
} |
||
| 3056 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3057 |
assembly {
|
||
| 3058 |
mstore(0x00, m0) |
||
| 3059 |
mstore(0x20, m1) |
||
| 3060 |
mstore(0x40, m2) |
||
| 3061 |
mstore(0x60, m3) |
||
| 3062 |
mstore(0x80, m4) |
||
| 3063 |
mstore(0xa0, m5) |
||
| 3064 |
mstore(0xc0, m6) |
||
| 3065 |
} |
||
| 3066 |
} |
||
| 3067 | |||
| 3068 |
function log(address p0, address p1, uint256 p2, address p3) internal pure {
|
||
| 3069 |
bytes32 m0; |
||
| 3070 |
bytes32 m1; |
||
| 3071 |
bytes32 m2; |
||
| 3072 |
bytes32 m3; |
||
| 3073 |
bytes32 m4; |
||
| 3074 |
assembly {
|
||
| 3075 |
m0 := mload(0x00) |
||
| 3076 |
m1 := mload(0x20) |
||
| 3077 |
m2 := mload(0x40) |
||
| 3078 |
m3 := mload(0x60) |
||
| 3079 |
m4 := mload(0x80) |
||
| 3080 |
// Selector of `log(address,address,uint256,address)`. |
||
| 3081 |
mstore(0x00, 0x8da6def5) |
||
| 3082 |
mstore(0x20, p0) |
||
| 3083 |
mstore(0x40, p1) |
||
| 3084 |
mstore(0x60, p2) |
||
| 3085 |
mstore(0x80, p3) |
||
| 3086 |
} |
||
| 3087 |
_sendLogPayload(0x1c, 0x84); |
||
| 3088 |
assembly {
|
||
| 3089 |
mstore(0x00, m0) |
||
| 3090 |
mstore(0x20, m1) |
||
| 3091 |
mstore(0x40, m2) |
||
| 3092 |
mstore(0x60, m3) |
||
| 3093 |
mstore(0x80, m4) |
||
| 3094 |
} |
||
| 3095 |
} |
||
| 3096 | |||
| 3097 |
function log(address p0, address p1, uint256 p2, bool p3) internal pure {
|
||
| 3098 |
bytes32 m0; |
||
| 3099 |
bytes32 m1; |
||
| 3100 |
bytes32 m2; |
||
| 3101 |
bytes32 m3; |
||
| 3102 |
bytes32 m4; |
||
| 3103 |
assembly {
|
||
| 3104 |
m0 := mload(0x00) |
||
| 3105 |
m1 := mload(0x20) |
||
| 3106 |
m2 := mload(0x40) |
||
| 3107 |
m3 := mload(0x60) |
||
| 3108 |
m4 := mload(0x80) |
||
| 3109 |
// Selector of `log(address,address,uint256,bool)`. |
||
| 3110 |
mstore(0x00, 0x9b4254e2) |
||
| 3111 |
mstore(0x20, p0) |
||
| 3112 |
mstore(0x40, p1) |
||
| 3113 |
mstore(0x60, p2) |
||
| 3114 |
mstore(0x80, p3) |
||
| 3115 |
} |
||
| 3116 |
_sendLogPayload(0x1c, 0x84); |
||
| 3117 |
assembly {
|
||
| 3118 |
mstore(0x00, m0) |
||
| 3119 |
mstore(0x20, m1) |
||
| 3120 |
mstore(0x40, m2) |
||
| 3121 |
mstore(0x60, m3) |
||
| 3122 |
mstore(0x80, m4) |
||
| 3123 |
} |
||
| 3124 |
} |
||
| 3125 | |||
| 3126 |
function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {
|
||
| 3127 |
bytes32 m0; |
||
| 3128 |
bytes32 m1; |
||
| 3129 |
bytes32 m2; |
||
| 3130 |
bytes32 m3; |
||
| 3131 |
bytes32 m4; |
||
| 3132 |
assembly {
|
||
| 3133 |
m0 := mload(0x00) |
||
| 3134 |
m1 := mload(0x20) |
||
| 3135 |
m2 := mload(0x40) |
||
| 3136 |
m3 := mload(0x60) |
||
| 3137 |
m4 := mload(0x80) |
||
| 3138 |
// Selector of `log(address,address,uint256,uint256)`. |
||
| 3139 |
mstore(0x00, 0xbe553481) |
||
| 3140 |
mstore(0x20, p0) |
||
| 3141 |
mstore(0x40, p1) |
||
| 3142 |
mstore(0x60, p2) |
||
| 3143 |
mstore(0x80, p3) |
||
| 3144 |
} |
||
| 3145 |
_sendLogPayload(0x1c, 0x84); |
||
| 3146 |
assembly {
|
||
| 3147 |
mstore(0x00, m0) |
||
| 3148 |
mstore(0x20, m1) |
||
| 3149 |
mstore(0x40, m2) |
||
| 3150 |
mstore(0x60, m3) |
||
| 3151 |
mstore(0x80, m4) |
||
| 3152 |
} |
||
| 3153 |
} |
||
| 3154 | |||
| 3155 |
function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 3156 |
bytes32 m0; |
||
| 3157 |
bytes32 m1; |
||
| 3158 |
bytes32 m2; |
||
| 3159 |
bytes32 m3; |
||
| 3160 |
bytes32 m4; |
||
| 3161 |
bytes32 m5; |
||
| 3162 |
bytes32 m6; |
||
| 3163 |
assembly {
|
||
| 3164 |
function writeString(pos, w) {
|
||
| 3165 |
let length := 0 |
||
| 3166 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3167 |
mstore(pos, length) |
||
| 3168 |
let shift := sub(256, shl(3, length)) |
||
| 3169 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3170 |
} |
||
| 3171 |
m0 := mload(0x00) |
||
| 3172 |
m1 := mload(0x20) |
||
| 3173 |
m2 := mload(0x40) |
||
| 3174 |
m3 := mload(0x60) |
||
| 3175 |
m4 := mload(0x80) |
||
| 3176 |
m5 := mload(0xa0) |
||
| 3177 |
m6 := mload(0xc0) |
||
| 3178 |
// Selector of `log(address,address,uint256,string)`. |
||
| 3179 |
mstore(0x00, 0xfdb4f990) |
||
| 3180 |
mstore(0x20, p0) |
||
| 3181 |
mstore(0x40, p1) |
||
| 3182 |
mstore(0x60, p2) |
||
| 3183 |
mstore(0x80, 0x80) |
||
| 3184 |
writeString(0xa0, p3) |
||
| 3185 |
} |
||
| 3186 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3187 |
assembly {
|
||
| 3188 |
mstore(0x00, m0) |
||
| 3189 |
mstore(0x20, m1) |
||
| 3190 |
mstore(0x40, m2) |
||
| 3191 |
mstore(0x60, m3) |
||
| 3192 |
mstore(0x80, m4) |
||
| 3193 |
mstore(0xa0, m5) |
||
| 3194 |
mstore(0xc0, m6) |
||
| 3195 |
} |
||
| 3196 |
} |
||
| 3197 | |||
| 3198 |
function log(address p0, address p1, bytes32 p2, address p3) internal pure {
|
||
| 3199 |
bytes32 m0; |
||
| 3200 |
bytes32 m1; |
||
| 3201 |
bytes32 m2; |
||
| 3202 |
bytes32 m3; |
||
| 3203 |
bytes32 m4; |
||
| 3204 |
bytes32 m5; |
||
| 3205 |
bytes32 m6; |
||
| 3206 |
assembly {
|
||
| 3207 |
function writeString(pos, w) {
|
||
| 3208 |
let length := 0 |
||
| 3209 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3210 |
mstore(pos, length) |
||
| 3211 |
let shift := sub(256, shl(3, length)) |
||
| 3212 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3213 |
} |
||
| 3214 |
m0 := mload(0x00) |
||
| 3215 |
m1 := mload(0x20) |
||
| 3216 |
m2 := mload(0x40) |
||
| 3217 |
m3 := mload(0x60) |
||
| 3218 |
m4 := mload(0x80) |
||
| 3219 |
m5 := mload(0xa0) |
||
| 3220 |
m6 := mload(0xc0) |
||
| 3221 |
// Selector of `log(address,address,string,address)`. |
||
| 3222 |
mstore(0x00, 0x8f736d16) |
||
| 3223 |
mstore(0x20, p0) |
||
| 3224 |
mstore(0x40, p1) |
||
| 3225 |
mstore(0x60, 0x80) |
||
| 3226 |
mstore(0x80, p3) |
||
| 3227 |
writeString(0xa0, p2) |
||
| 3228 |
} |
||
| 3229 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3230 |
assembly {
|
||
| 3231 |
mstore(0x00, m0) |
||
| 3232 |
mstore(0x20, m1) |
||
| 3233 |
mstore(0x40, m2) |
||
| 3234 |
mstore(0x60, m3) |
||
| 3235 |
mstore(0x80, m4) |
||
| 3236 |
mstore(0xa0, m5) |
||
| 3237 |
mstore(0xc0, m6) |
||
| 3238 |
} |
||
| 3239 |
} |
||
| 3240 | |||
| 3241 |
function log(address p0, address p1, bytes32 p2, bool p3) internal pure {
|
||
| 3242 |
bytes32 m0; |
||
| 3243 |
bytes32 m1; |
||
| 3244 |
bytes32 m2; |
||
| 3245 |
bytes32 m3; |
||
| 3246 |
bytes32 m4; |
||
| 3247 |
bytes32 m5; |
||
| 3248 |
bytes32 m6; |
||
| 3249 |
assembly {
|
||
| 3250 |
function writeString(pos, w) {
|
||
| 3251 |
let length := 0 |
||
| 3252 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3253 |
mstore(pos, length) |
||
| 3254 |
let shift := sub(256, shl(3, length)) |
||
| 3255 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3256 |
} |
||
| 3257 |
m0 := mload(0x00) |
||
| 3258 |
m1 := mload(0x20) |
||
| 3259 |
m2 := mload(0x40) |
||
| 3260 |
m3 := mload(0x60) |
||
| 3261 |
m4 := mload(0x80) |
||
| 3262 |
m5 := mload(0xa0) |
||
| 3263 |
m6 := mload(0xc0) |
||
| 3264 |
// Selector of `log(address,address,string,bool)`. |
||
| 3265 |
mstore(0x00, 0x6f1a594e) |
||
| 3266 |
mstore(0x20, p0) |
||
| 3267 |
mstore(0x40, p1) |
||
| 3268 |
mstore(0x60, 0x80) |
||
| 3269 |
mstore(0x80, p3) |
||
| 3270 |
writeString(0xa0, p2) |
||
| 3271 |
} |
||
| 3272 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3273 |
assembly {
|
||
| 3274 |
mstore(0x00, m0) |
||
| 3275 |
mstore(0x20, m1) |
||
| 3276 |
mstore(0x40, m2) |
||
| 3277 |
mstore(0x60, m3) |
||
| 3278 |
mstore(0x80, m4) |
||
| 3279 |
mstore(0xa0, m5) |
||
| 3280 |
mstore(0xc0, m6) |
||
| 3281 |
} |
||
| 3282 |
} |
||
| 3283 | |||
| 3284 |
function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 3285 |
bytes32 m0; |
||
| 3286 |
bytes32 m1; |
||
| 3287 |
bytes32 m2; |
||
| 3288 |
bytes32 m3; |
||
| 3289 |
bytes32 m4; |
||
| 3290 |
bytes32 m5; |
||
| 3291 |
bytes32 m6; |
||
| 3292 |
assembly {
|
||
| 3293 |
function writeString(pos, w) {
|
||
| 3294 |
let length := 0 |
||
| 3295 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3296 |
mstore(pos, length) |
||
| 3297 |
let shift := sub(256, shl(3, length)) |
||
| 3298 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3299 |
} |
||
| 3300 |
m0 := mload(0x00) |
||
| 3301 |
m1 := mload(0x20) |
||
| 3302 |
m2 := mload(0x40) |
||
| 3303 |
m3 := mload(0x60) |
||
| 3304 |
m4 := mload(0x80) |
||
| 3305 |
m5 := mload(0xa0) |
||
| 3306 |
m6 := mload(0xc0) |
||
| 3307 |
// Selector of `log(address,address,string,uint256)`. |
||
| 3308 |
mstore(0x00, 0xef1cefe7) |
||
| 3309 |
mstore(0x20, p0) |
||
| 3310 |
mstore(0x40, p1) |
||
| 3311 |
mstore(0x60, 0x80) |
||
| 3312 |
mstore(0x80, p3) |
||
| 3313 |
writeString(0xa0, p2) |
||
| 3314 |
} |
||
| 3315 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3316 |
assembly {
|
||
| 3317 |
mstore(0x00, m0) |
||
| 3318 |
mstore(0x20, m1) |
||
| 3319 |
mstore(0x40, m2) |
||
| 3320 |
mstore(0x60, m3) |
||
| 3321 |
mstore(0x80, m4) |
||
| 3322 |
mstore(0xa0, m5) |
||
| 3323 |
mstore(0xc0, m6) |
||
| 3324 |
} |
||
| 3325 |
} |
||
| 3326 | |||
| 3327 |
function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 3328 |
bytes32 m0; |
||
| 3329 |
bytes32 m1; |
||
| 3330 |
bytes32 m2; |
||
| 3331 |
bytes32 m3; |
||
| 3332 |
bytes32 m4; |
||
| 3333 |
bytes32 m5; |
||
| 3334 |
bytes32 m6; |
||
| 3335 |
bytes32 m7; |
||
| 3336 |
bytes32 m8; |
||
| 3337 |
assembly {
|
||
| 3338 |
function writeString(pos, w) {
|
||
| 3339 |
let length := 0 |
||
| 3340 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3341 |
mstore(pos, length) |
||
| 3342 |
let shift := sub(256, shl(3, length)) |
||
| 3343 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3344 |
} |
||
| 3345 |
m0 := mload(0x00) |
||
| 3346 |
m1 := mload(0x20) |
||
| 3347 |
m2 := mload(0x40) |
||
| 3348 |
m3 := mload(0x60) |
||
| 3349 |
m4 := mload(0x80) |
||
| 3350 |
m5 := mload(0xa0) |
||
| 3351 |
m6 := mload(0xc0) |
||
| 3352 |
m7 := mload(0xe0) |
||
| 3353 |
m8 := mload(0x100) |
||
| 3354 |
// Selector of `log(address,address,string,string)`. |
||
| 3355 |
mstore(0x00, 0x21bdaf25) |
||
| 3356 |
mstore(0x20, p0) |
||
| 3357 |
mstore(0x40, p1) |
||
| 3358 |
mstore(0x60, 0x80) |
||
| 3359 |
mstore(0x80, 0xc0) |
||
| 3360 |
writeString(0xa0, p2) |
||
| 3361 |
writeString(0xe0, p3) |
||
| 3362 |
} |
||
| 3363 |
_sendLogPayload(0x1c, 0x104); |
||
| 3364 |
assembly {
|
||
| 3365 |
mstore(0x00, m0) |
||
| 3366 |
mstore(0x20, m1) |
||
| 3367 |
mstore(0x40, m2) |
||
| 3368 |
mstore(0x60, m3) |
||
| 3369 |
mstore(0x80, m4) |
||
| 3370 |
mstore(0xa0, m5) |
||
| 3371 |
mstore(0xc0, m6) |
||
| 3372 |
mstore(0xe0, m7) |
||
| 3373 |
mstore(0x100, m8) |
||
| 3374 |
} |
||
| 3375 |
} |
||
| 3376 | |||
| 3377 |
function log(address p0, bool p1, address p2, address p3) internal pure {
|
||
| 3378 |
bytes32 m0; |
||
| 3379 |
bytes32 m1; |
||
| 3380 |
bytes32 m2; |
||
| 3381 |
bytes32 m3; |
||
| 3382 |
bytes32 m4; |
||
| 3383 |
assembly {
|
||
| 3384 |
m0 := mload(0x00) |
||
| 3385 |
m1 := mload(0x20) |
||
| 3386 |
m2 := mload(0x40) |
||
| 3387 |
m3 := mload(0x60) |
||
| 3388 |
m4 := mload(0x80) |
||
| 3389 |
// Selector of `log(address,bool,address,address)`. |
||
| 3390 |
mstore(0x00, 0x660375dd) |
||
| 3391 |
mstore(0x20, p0) |
||
| 3392 |
mstore(0x40, p1) |
||
| 3393 |
mstore(0x60, p2) |
||
| 3394 |
mstore(0x80, p3) |
||
| 3395 |
} |
||
| 3396 |
_sendLogPayload(0x1c, 0x84); |
||
| 3397 |
assembly {
|
||
| 3398 |
mstore(0x00, m0) |
||
| 3399 |
mstore(0x20, m1) |
||
| 3400 |
mstore(0x40, m2) |
||
| 3401 |
mstore(0x60, m3) |
||
| 3402 |
mstore(0x80, m4) |
||
| 3403 |
} |
||
| 3404 |
} |
||
| 3405 | |||
| 3406 |
function log(address p0, bool p1, address p2, bool p3) internal pure {
|
||
| 3407 |
bytes32 m0; |
||
| 3408 |
bytes32 m1; |
||
| 3409 |
bytes32 m2; |
||
| 3410 |
bytes32 m3; |
||
| 3411 |
bytes32 m4; |
||
| 3412 |
assembly {
|
||
| 3413 |
m0 := mload(0x00) |
||
| 3414 |
m1 := mload(0x20) |
||
| 3415 |
m2 := mload(0x40) |
||
| 3416 |
m3 := mload(0x60) |
||
| 3417 |
m4 := mload(0x80) |
||
| 3418 |
// Selector of `log(address,bool,address,bool)`. |
||
| 3419 |
mstore(0x00, 0xa6f50b0f) |
||
| 3420 |
mstore(0x20, p0) |
||
| 3421 |
mstore(0x40, p1) |
||
| 3422 |
mstore(0x60, p2) |
||
| 3423 |
mstore(0x80, p3) |
||
| 3424 |
} |
||
| 3425 |
_sendLogPayload(0x1c, 0x84); |
||
| 3426 |
assembly {
|
||
| 3427 |
mstore(0x00, m0) |
||
| 3428 |
mstore(0x20, m1) |
||
| 3429 |
mstore(0x40, m2) |
||
| 3430 |
mstore(0x60, m3) |
||
| 3431 |
mstore(0x80, m4) |
||
| 3432 |
} |
||
| 3433 |
} |
||
| 3434 | |||
| 3435 |
function log(address p0, bool p1, address p2, uint256 p3) internal pure {
|
||
| 3436 |
bytes32 m0; |
||
| 3437 |
bytes32 m1; |
||
| 3438 |
bytes32 m2; |
||
| 3439 |
bytes32 m3; |
||
| 3440 |
bytes32 m4; |
||
| 3441 |
assembly {
|
||
| 3442 |
m0 := mload(0x00) |
||
| 3443 |
m1 := mload(0x20) |
||
| 3444 |
m2 := mload(0x40) |
||
| 3445 |
m3 := mload(0x60) |
||
| 3446 |
m4 := mload(0x80) |
||
| 3447 |
// Selector of `log(address,bool,address,uint256)`. |
||
| 3448 |
mstore(0x00, 0xa75c59de) |
||
| 3449 |
mstore(0x20, p0) |
||
| 3450 |
mstore(0x40, p1) |
||
| 3451 |
mstore(0x60, p2) |
||
| 3452 |
mstore(0x80, p3) |
||
| 3453 |
} |
||
| 3454 |
_sendLogPayload(0x1c, 0x84); |
||
| 3455 |
assembly {
|
||
| 3456 |
mstore(0x00, m0) |
||
| 3457 |
mstore(0x20, m1) |
||
| 3458 |
mstore(0x40, m2) |
||
| 3459 |
mstore(0x60, m3) |
||
| 3460 |
mstore(0x80, m4) |
||
| 3461 |
} |
||
| 3462 |
} |
||
| 3463 | |||
| 3464 |
function log(address p0, bool p1, address p2, bytes32 p3) internal pure {
|
||
| 3465 |
bytes32 m0; |
||
| 3466 |
bytes32 m1; |
||
| 3467 |
bytes32 m2; |
||
| 3468 |
bytes32 m3; |
||
| 3469 |
bytes32 m4; |
||
| 3470 |
bytes32 m5; |
||
| 3471 |
bytes32 m6; |
||
| 3472 |
assembly {
|
||
| 3473 |
function writeString(pos, w) {
|
||
| 3474 |
let length := 0 |
||
| 3475 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3476 |
mstore(pos, length) |
||
| 3477 |
let shift := sub(256, shl(3, length)) |
||
| 3478 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3479 |
} |
||
| 3480 |
m0 := mload(0x00) |
||
| 3481 |
m1 := mload(0x20) |
||
| 3482 |
m2 := mload(0x40) |
||
| 3483 |
m3 := mload(0x60) |
||
| 3484 |
m4 := mload(0x80) |
||
| 3485 |
m5 := mload(0xa0) |
||
| 3486 |
m6 := mload(0xc0) |
||
| 3487 |
// Selector of `log(address,bool,address,string)`. |
||
| 3488 |
mstore(0x00, 0x2dd778e6) |
||
| 3489 |
mstore(0x20, p0) |
||
| 3490 |
mstore(0x40, p1) |
||
| 3491 |
mstore(0x60, p2) |
||
| 3492 |
mstore(0x80, 0x80) |
||
| 3493 |
writeString(0xa0, p3) |
||
| 3494 |
} |
||
| 3495 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3496 |
assembly {
|
||
| 3497 |
mstore(0x00, m0) |
||
| 3498 |
mstore(0x20, m1) |
||
| 3499 |
mstore(0x40, m2) |
||
| 3500 |
mstore(0x60, m3) |
||
| 3501 |
mstore(0x80, m4) |
||
| 3502 |
mstore(0xa0, m5) |
||
| 3503 |
mstore(0xc0, m6) |
||
| 3504 |
} |
||
| 3505 |
} |
||
| 3506 | |||
| 3507 |
function log(address p0, bool p1, bool p2, address p3) internal pure {
|
||
| 3508 |
bytes32 m0; |
||
| 3509 |
bytes32 m1; |
||
| 3510 |
bytes32 m2; |
||
| 3511 |
bytes32 m3; |
||
| 3512 |
bytes32 m4; |
||
| 3513 |
assembly {
|
||
| 3514 |
m0 := mload(0x00) |
||
| 3515 |
m1 := mload(0x20) |
||
| 3516 |
m2 := mload(0x40) |
||
| 3517 |
m3 := mload(0x60) |
||
| 3518 |
m4 := mload(0x80) |
||
| 3519 |
// Selector of `log(address,bool,bool,address)`. |
||
| 3520 |
mstore(0x00, 0xcf394485) |
||
| 3521 |
mstore(0x20, p0) |
||
| 3522 |
mstore(0x40, p1) |
||
| 3523 |
mstore(0x60, p2) |
||
| 3524 |
mstore(0x80, p3) |
||
| 3525 |
} |
||
| 3526 |
_sendLogPayload(0x1c, 0x84); |
||
| 3527 |
assembly {
|
||
| 3528 |
mstore(0x00, m0) |
||
| 3529 |
mstore(0x20, m1) |
||
| 3530 |
mstore(0x40, m2) |
||
| 3531 |
mstore(0x60, m3) |
||
| 3532 |
mstore(0x80, m4) |
||
| 3533 |
} |
||
| 3534 |
} |
||
| 3535 | |||
| 3536 |
function log(address p0, bool p1, bool p2, bool p3) internal pure {
|
||
| 3537 |
bytes32 m0; |
||
| 3538 |
bytes32 m1; |
||
| 3539 |
bytes32 m2; |
||
| 3540 |
bytes32 m3; |
||
| 3541 |
bytes32 m4; |
||
| 3542 |
assembly {
|
||
| 3543 |
m0 := mload(0x00) |
||
| 3544 |
m1 := mload(0x20) |
||
| 3545 |
m2 := mload(0x40) |
||
| 3546 |
m3 := mload(0x60) |
||
| 3547 |
m4 := mload(0x80) |
||
| 3548 |
// Selector of `log(address,bool,bool,bool)`. |
||
| 3549 |
mstore(0x00, 0xcac43479) |
||
| 3550 |
mstore(0x20, p0) |
||
| 3551 |
mstore(0x40, p1) |
||
| 3552 |
mstore(0x60, p2) |
||
| 3553 |
mstore(0x80, p3) |
||
| 3554 |
} |
||
| 3555 |
_sendLogPayload(0x1c, 0x84); |
||
| 3556 |
assembly {
|
||
| 3557 |
mstore(0x00, m0) |
||
| 3558 |
mstore(0x20, m1) |
||
| 3559 |
mstore(0x40, m2) |
||
| 3560 |
mstore(0x60, m3) |
||
| 3561 |
mstore(0x80, m4) |
||
| 3562 |
} |
||
| 3563 |
} |
||
| 3564 | |||
| 3565 |
function log(address p0, bool p1, bool p2, uint256 p3) internal pure {
|
||
| 3566 |
bytes32 m0; |
||
| 3567 |
bytes32 m1; |
||
| 3568 |
bytes32 m2; |
||
| 3569 |
bytes32 m3; |
||
| 3570 |
bytes32 m4; |
||
| 3571 |
assembly {
|
||
| 3572 |
m0 := mload(0x00) |
||
| 3573 |
m1 := mload(0x20) |
||
| 3574 |
m2 := mload(0x40) |
||
| 3575 |
m3 := mload(0x60) |
||
| 3576 |
m4 := mload(0x80) |
||
| 3577 |
// Selector of `log(address,bool,bool,uint256)`. |
||
| 3578 |
mstore(0x00, 0x8c4e5de6) |
||
| 3579 |
mstore(0x20, p0) |
||
| 3580 |
mstore(0x40, p1) |
||
| 3581 |
mstore(0x60, p2) |
||
| 3582 |
mstore(0x80, p3) |
||
| 3583 |
} |
||
| 3584 |
_sendLogPayload(0x1c, 0x84); |
||
| 3585 |
assembly {
|
||
| 3586 |
mstore(0x00, m0) |
||
| 3587 |
mstore(0x20, m1) |
||
| 3588 |
mstore(0x40, m2) |
||
| 3589 |
mstore(0x60, m3) |
||
| 3590 |
mstore(0x80, m4) |
||
| 3591 |
} |
||
| 3592 |
} |
||
| 3593 | |||
| 3594 |
function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {
|
||
| 3595 |
bytes32 m0; |
||
| 3596 |
bytes32 m1; |
||
| 3597 |
bytes32 m2; |
||
| 3598 |
bytes32 m3; |
||
| 3599 |
bytes32 m4; |
||
| 3600 |
bytes32 m5; |
||
| 3601 |
bytes32 m6; |
||
| 3602 |
assembly {
|
||
| 3603 |
function writeString(pos, w) {
|
||
| 3604 |
let length := 0 |
||
| 3605 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3606 |
mstore(pos, length) |
||
| 3607 |
let shift := sub(256, shl(3, length)) |
||
| 3608 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3609 |
} |
||
| 3610 |
m0 := mload(0x00) |
||
| 3611 |
m1 := mload(0x20) |
||
| 3612 |
m2 := mload(0x40) |
||
| 3613 |
m3 := mload(0x60) |
||
| 3614 |
m4 := mload(0x80) |
||
| 3615 |
m5 := mload(0xa0) |
||
| 3616 |
m6 := mload(0xc0) |
||
| 3617 |
// Selector of `log(address,bool,bool,string)`. |
||
| 3618 |
mstore(0x00, 0xdfc4a2e8) |
||
| 3619 |
mstore(0x20, p0) |
||
| 3620 |
mstore(0x40, p1) |
||
| 3621 |
mstore(0x60, p2) |
||
| 3622 |
mstore(0x80, 0x80) |
||
| 3623 |
writeString(0xa0, p3) |
||
| 3624 |
} |
||
| 3625 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3626 |
assembly {
|
||
| 3627 |
mstore(0x00, m0) |
||
| 3628 |
mstore(0x20, m1) |
||
| 3629 |
mstore(0x40, m2) |
||
| 3630 |
mstore(0x60, m3) |
||
| 3631 |
mstore(0x80, m4) |
||
| 3632 |
mstore(0xa0, m5) |
||
| 3633 |
mstore(0xc0, m6) |
||
| 3634 |
} |
||
| 3635 |
} |
||
| 3636 | |||
| 3637 |
function log(address p0, bool p1, uint256 p2, address p3) internal pure {
|
||
| 3638 |
bytes32 m0; |
||
| 3639 |
bytes32 m1; |
||
| 3640 |
bytes32 m2; |
||
| 3641 |
bytes32 m3; |
||
| 3642 |
bytes32 m4; |
||
| 3643 |
assembly {
|
||
| 3644 |
m0 := mload(0x00) |
||
| 3645 |
m1 := mload(0x20) |
||
| 3646 |
m2 := mload(0x40) |
||
| 3647 |
m3 := mload(0x60) |
||
| 3648 |
m4 := mload(0x80) |
||
| 3649 |
// Selector of `log(address,bool,uint256,address)`. |
||
| 3650 |
mstore(0x00, 0xccf790a1) |
||
| 3651 |
mstore(0x20, p0) |
||
| 3652 |
mstore(0x40, p1) |
||
| 3653 |
mstore(0x60, p2) |
||
| 3654 |
mstore(0x80, p3) |
||
| 3655 |
} |
||
| 3656 |
_sendLogPayload(0x1c, 0x84); |
||
| 3657 |
assembly {
|
||
| 3658 |
mstore(0x00, m0) |
||
| 3659 |
mstore(0x20, m1) |
||
| 3660 |
mstore(0x40, m2) |
||
| 3661 |
mstore(0x60, m3) |
||
| 3662 |
mstore(0x80, m4) |
||
| 3663 |
} |
||
| 3664 |
} |
||
| 3665 | |||
| 3666 |
function log(address p0, bool p1, uint256 p2, bool p3) internal pure {
|
||
| 3667 |
bytes32 m0; |
||
| 3668 |
bytes32 m1; |
||
| 3669 |
bytes32 m2; |
||
| 3670 |
bytes32 m3; |
||
| 3671 |
bytes32 m4; |
||
| 3672 |
assembly {
|
||
| 3673 |
m0 := mload(0x00) |
||
| 3674 |
m1 := mload(0x20) |
||
| 3675 |
m2 := mload(0x40) |
||
| 3676 |
m3 := mload(0x60) |
||
| 3677 |
m4 := mload(0x80) |
||
| 3678 |
// Selector of `log(address,bool,uint256,bool)`. |
||
| 3679 |
mstore(0x00, 0xc4643e20) |
||
| 3680 |
mstore(0x20, p0) |
||
| 3681 |
mstore(0x40, p1) |
||
| 3682 |
mstore(0x60, p2) |
||
| 3683 |
mstore(0x80, p3) |
||
| 3684 |
} |
||
| 3685 |
_sendLogPayload(0x1c, 0x84); |
||
| 3686 |
assembly {
|
||
| 3687 |
mstore(0x00, m0) |
||
| 3688 |
mstore(0x20, m1) |
||
| 3689 |
mstore(0x40, m2) |
||
| 3690 |
mstore(0x60, m3) |
||
| 3691 |
mstore(0x80, m4) |
||
| 3692 |
} |
||
| 3693 |
} |
||
| 3694 | |||
| 3695 |
function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {
|
||
| 3696 |
bytes32 m0; |
||
| 3697 |
bytes32 m1; |
||
| 3698 |
bytes32 m2; |
||
| 3699 |
bytes32 m3; |
||
| 3700 |
bytes32 m4; |
||
| 3701 |
assembly {
|
||
| 3702 |
m0 := mload(0x00) |
||
| 3703 |
m1 := mload(0x20) |
||
| 3704 |
m2 := mload(0x40) |
||
| 3705 |
m3 := mload(0x60) |
||
| 3706 |
m4 := mload(0x80) |
||
| 3707 |
// Selector of `log(address,bool,uint256,uint256)`. |
||
| 3708 |
mstore(0x00, 0x386ff5f4) |
||
| 3709 |
mstore(0x20, p0) |
||
| 3710 |
mstore(0x40, p1) |
||
| 3711 |
mstore(0x60, p2) |
||
| 3712 |
mstore(0x80, p3) |
||
| 3713 |
} |
||
| 3714 |
_sendLogPayload(0x1c, 0x84); |
||
| 3715 |
assembly {
|
||
| 3716 |
mstore(0x00, m0) |
||
| 3717 |
mstore(0x20, m1) |
||
| 3718 |
mstore(0x40, m2) |
||
| 3719 |
mstore(0x60, m3) |
||
| 3720 |
mstore(0x80, m4) |
||
| 3721 |
} |
||
| 3722 |
} |
||
| 3723 | |||
| 3724 |
function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 3725 |
bytes32 m0; |
||
| 3726 |
bytes32 m1; |
||
| 3727 |
bytes32 m2; |
||
| 3728 |
bytes32 m3; |
||
| 3729 |
bytes32 m4; |
||
| 3730 |
bytes32 m5; |
||
| 3731 |
bytes32 m6; |
||
| 3732 |
assembly {
|
||
| 3733 |
function writeString(pos, w) {
|
||
| 3734 |
let length := 0 |
||
| 3735 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3736 |
mstore(pos, length) |
||
| 3737 |
let shift := sub(256, shl(3, length)) |
||
| 3738 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3739 |
} |
||
| 3740 |
m0 := mload(0x00) |
||
| 3741 |
m1 := mload(0x20) |
||
| 3742 |
m2 := mload(0x40) |
||
| 3743 |
m3 := mload(0x60) |
||
| 3744 |
m4 := mload(0x80) |
||
| 3745 |
m5 := mload(0xa0) |
||
| 3746 |
m6 := mload(0xc0) |
||
| 3747 |
// Selector of `log(address,bool,uint256,string)`. |
||
| 3748 |
mstore(0x00, 0x0aa6cfad) |
||
| 3749 |
mstore(0x20, p0) |
||
| 3750 |
mstore(0x40, p1) |
||
| 3751 |
mstore(0x60, p2) |
||
| 3752 |
mstore(0x80, 0x80) |
||
| 3753 |
writeString(0xa0, p3) |
||
| 3754 |
} |
||
| 3755 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3756 |
assembly {
|
||
| 3757 |
mstore(0x00, m0) |
||
| 3758 |
mstore(0x20, m1) |
||
| 3759 |
mstore(0x40, m2) |
||
| 3760 |
mstore(0x60, m3) |
||
| 3761 |
mstore(0x80, m4) |
||
| 3762 |
mstore(0xa0, m5) |
||
| 3763 |
mstore(0xc0, m6) |
||
| 3764 |
} |
||
| 3765 |
} |
||
| 3766 | |||
| 3767 |
function log(address p0, bool p1, bytes32 p2, address p3) internal pure {
|
||
| 3768 |
bytes32 m0; |
||
| 3769 |
bytes32 m1; |
||
| 3770 |
bytes32 m2; |
||
| 3771 |
bytes32 m3; |
||
| 3772 |
bytes32 m4; |
||
| 3773 |
bytes32 m5; |
||
| 3774 |
bytes32 m6; |
||
| 3775 |
assembly {
|
||
| 3776 |
function writeString(pos, w) {
|
||
| 3777 |
let length := 0 |
||
| 3778 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3779 |
mstore(pos, length) |
||
| 3780 |
let shift := sub(256, shl(3, length)) |
||
| 3781 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3782 |
} |
||
| 3783 |
m0 := mload(0x00) |
||
| 3784 |
m1 := mload(0x20) |
||
| 3785 |
m2 := mload(0x40) |
||
| 3786 |
m3 := mload(0x60) |
||
| 3787 |
m4 := mload(0x80) |
||
| 3788 |
m5 := mload(0xa0) |
||
| 3789 |
m6 := mload(0xc0) |
||
| 3790 |
// Selector of `log(address,bool,string,address)`. |
||
| 3791 |
mstore(0x00, 0x19fd4956) |
||
| 3792 |
mstore(0x20, p0) |
||
| 3793 |
mstore(0x40, p1) |
||
| 3794 |
mstore(0x60, 0x80) |
||
| 3795 |
mstore(0x80, p3) |
||
| 3796 |
writeString(0xa0, p2) |
||
| 3797 |
} |
||
| 3798 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3799 |
assembly {
|
||
| 3800 |
mstore(0x00, m0) |
||
| 3801 |
mstore(0x20, m1) |
||
| 3802 |
mstore(0x40, m2) |
||
| 3803 |
mstore(0x60, m3) |
||
| 3804 |
mstore(0x80, m4) |
||
| 3805 |
mstore(0xa0, m5) |
||
| 3806 |
mstore(0xc0, m6) |
||
| 3807 |
} |
||
| 3808 |
} |
||
| 3809 | |||
| 3810 |
function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {
|
||
| 3811 |
bytes32 m0; |
||
| 3812 |
bytes32 m1; |
||
| 3813 |
bytes32 m2; |
||
| 3814 |
bytes32 m3; |
||
| 3815 |
bytes32 m4; |
||
| 3816 |
bytes32 m5; |
||
| 3817 |
bytes32 m6; |
||
| 3818 |
assembly {
|
||
| 3819 |
function writeString(pos, w) {
|
||
| 3820 |
let length := 0 |
||
| 3821 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3822 |
mstore(pos, length) |
||
| 3823 |
let shift := sub(256, shl(3, length)) |
||
| 3824 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3825 |
} |
||
| 3826 |
m0 := mload(0x00) |
||
| 3827 |
m1 := mload(0x20) |
||
| 3828 |
m2 := mload(0x40) |
||
| 3829 |
m3 := mload(0x60) |
||
| 3830 |
m4 := mload(0x80) |
||
| 3831 |
m5 := mload(0xa0) |
||
| 3832 |
m6 := mload(0xc0) |
||
| 3833 |
// Selector of `log(address,bool,string,bool)`. |
||
| 3834 |
mstore(0x00, 0x50ad461d) |
||
| 3835 |
mstore(0x20, p0) |
||
| 3836 |
mstore(0x40, p1) |
||
| 3837 |
mstore(0x60, 0x80) |
||
| 3838 |
mstore(0x80, p3) |
||
| 3839 |
writeString(0xa0, p2) |
||
| 3840 |
} |
||
| 3841 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3842 |
assembly {
|
||
| 3843 |
mstore(0x00, m0) |
||
| 3844 |
mstore(0x20, m1) |
||
| 3845 |
mstore(0x40, m2) |
||
| 3846 |
mstore(0x60, m3) |
||
| 3847 |
mstore(0x80, m4) |
||
| 3848 |
mstore(0xa0, m5) |
||
| 3849 |
mstore(0xc0, m6) |
||
| 3850 |
} |
||
| 3851 |
} |
||
| 3852 | |||
| 3853 |
function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 3854 |
bytes32 m0; |
||
| 3855 |
bytes32 m1; |
||
| 3856 |
bytes32 m2; |
||
| 3857 |
bytes32 m3; |
||
| 3858 |
bytes32 m4; |
||
| 3859 |
bytes32 m5; |
||
| 3860 |
bytes32 m6; |
||
| 3861 |
assembly {
|
||
| 3862 |
function writeString(pos, w) {
|
||
| 3863 |
let length := 0 |
||
| 3864 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3865 |
mstore(pos, length) |
||
| 3866 |
let shift := sub(256, shl(3, length)) |
||
| 3867 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3868 |
} |
||
| 3869 |
m0 := mload(0x00) |
||
| 3870 |
m1 := mload(0x20) |
||
| 3871 |
m2 := mload(0x40) |
||
| 3872 |
m3 := mload(0x60) |
||
| 3873 |
m4 := mload(0x80) |
||
| 3874 |
m5 := mload(0xa0) |
||
| 3875 |
m6 := mload(0xc0) |
||
| 3876 |
// Selector of `log(address,bool,string,uint256)`. |
||
| 3877 |
mstore(0x00, 0x80e6a20b) |
||
| 3878 |
mstore(0x20, p0) |
||
| 3879 |
mstore(0x40, p1) |
||
| 3880 |
mstore(0x60, 0x80) |
||
| 3881 |
mstore(0x80, p3) |
||
| 3882 |
writeString(0xa0, p2) |
||
| 3883 |
} |
||
| 3884 |
_sendLogPayload(0x1c, 0xc4); |
||
| 3885 |
assembly {
|
||
| 3886 |
mstore(0x00, m0) |
||
| 3887 |
mstore(0x20, m1) |
||
| 3888 |
mstore(0x40, m2) |
||
| 3889 |
mstore(0x60, m3) |
||
| 3890 |
mstore(0x80, m4) |
||
| 3891 |
mstore(0xa0, m5) |
||
| 3892 |
mstore(0xc0, m6) |
||
| 3893 |
} |
||
| 3894 |
} |
||
| 3895 | |||
| 3896 |
function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 3897 |
bytes32 m0; |
||
| 3898 |
bytes32 m1; |
||
| 3899 |
bytes32 m2; |
||
| 3900 |
bytes32 m3; |
||
| 3901 |
bytes32 m4; |
||
| 3902 |
bytes32 m5; |
||
| 3903 |
bytes32 m6; |
||
| 3904 |
bytes32 m7; |
||
| 3905 |
bytes32 m8; |
||
| 3906 |
assembly {
|
||
| 3907 |
function writeString(pos, w) {
|
||
| 3908 |
let length := 0 |
||
| 3909 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 3910 |
mstore(pos, length) |
||
| 3911 |
let shift := sub(256, shl(3, length)) |
||
| 3912 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 3913 |
} |
||
| 3914 |
m0 := mload(0x00) |
||
| 3915 |
m1 := mload(0x20) |
||
| 3916 |
m2 := mload(0x40) |
||
| 3917 |
m3 := mload(0x60) |
||
| 3918 |
m4 := mload(0x80) |
||
| 3919 |
m5 := mload(0xa0) |
||
| 3920 |
m6 := mload(0xc0) |
||
| 3921 |
m7 := mload(0xe0) |
||
| 3922 |
m8 := mload(0x100) |
||
| 3923 |
// Selector of `log(address,bool,string,string)`. |
||
| 3924 |
mstore(0x00, 0x475c5c33) |
||
| 3925 |
mstore(0x20, p0) |
||
| 3926 |
mstore(0x40, p1) |
||
| 3927 |
mstore(0x60, 0x80) |
||
| 3928 |
mstore(0x80, 0xc0) |
||
| 3929 |
writeString(0xa0, p2) |
||
| 3930 |
writeString(0xe0, p3) |
||
| 3931 |
} |
||
| 3932 |
_sendLogPayload(0x1c, 0x104); |
||
| 3933 |
assembly {
|
||
| 3934 |
mstore(0x00, m0) |
||
| 3935 |
mstore(0x20, m1) |
||
| 3936 |
mstore(0x40, m2) |
||
| 3937 |
mstore(0x60, m3) |
||
| 3938 |
mstore(0x80, m4) |
||
| 3939 |
mstore(0xa0, m5) |
||
| 3940 |
mstore(0xc0, m6) |
||
| 3941 |
mstore(0xe0, m7) |
||
| 3942 |
mstore(0x100, m8) |
||
| 3943 |
} |
||
| 3944 |
} |
||
| 3945 | |||
| 3946 |
function log(address p0, uint256 p1, address p2, address p3) internal pure {
|
||
| 3947 |
bytes32 m0; |
||
| 3948 |
bytes32 m1; |
||
| 3949 |
bytes32 m2; |
||
| 3950 |
bytes32 m3; |
||
| 3951 |
bytes32 m4; |
||
| 3952 |
assembly {
|
||
| 3953 |
m0 := mload(0x00) |
||
| 3954 |
m1 := mload(0x20) |
||
| 3955 |
m2 := mload(0x40) |
||
| 3956 |
m3 := mload(0x60) |
||
| 3957 |
m4 := mload(0x80) |
||
| 3958 |
// Selector of `log(address,uint256,address,address)`. |
||
| 3959 |
mstore(0x00, 0x478d1c62) |
||
| 3960 |
mstore(0x20, p0) |
||
| 3961 |
mstore(0x40, p1) |
||
| 3962 |
mstore(0x60, p2) |
||
| 3963 |
mstore(0x80, p3) |
||
| 3964 |
} |
||
| 3965 |
_sendLogPayload(0x1c, 0x84); |
||
| 3966 |
assembly {
|
||
| 3967 |
mstore(0x00, m0) |
||
| 3968 |
mstore(0x20, m1) |
||
| 3969 |
mstore(0x40, m2) |
||
| 3970 |
mstore(0x60, m3) |
||
| 3971 |
mstore(0x80, m4) |
||
| 3972 |
} |
||
| 3973 |
} |
||
| 3974 | |||
| 3975 |
function log(address p0, uint256 p1, address p2, bool p3) internal pure {
|
||
| 3976 |
bytes32 m0; |
||
| 3977 |
bytes32 m1; |
||
| 3978 |
bytes32 m2; |
||
| 3979 |
bytes32 m3; |
||
| 3980 |
bytes32 m4; |
||
| 3981 |
assembly {
|
||
| 3982 |
m0 := mload(0x00) |
||
| 3983 |
m1 := mload(0x20) |
||
| 3984 |
m2 := mload(0x40) |
||
| 3985 |
m3 := mload(0x60) |
||
| 3986 |
m4 := mload(0x80) |
||
| 3987 |
// Selector of `log(address,uint256,address,bool)`. |
||
| 3988 |
mstore(0x00, 0xa1bcc9b3) |
||
| 3989 |
mstore(0x20, p0) |
||
| 3990 |
mstore(0x40, p1) |
||
| 3991 |
mstore(0x60, p2) |
||
| 3992 |
mstore(0x80, p3) |
||
| 3993 |
} |
||
| 3994 |
_sendLogPayload(0x1c, 0x84); |
||
| 3995 |
assembly {
|
||
| 3996 |
mstore(0x00, m0) |
||
| 3997 |
mstore(0x20, m1) |
||
| 3998 |
mstore(0x40, m2) |
||
| 3999 |
mstore(0x60, m3) |
||
| 4000 |
mstore(0x80, m4) |
||
| 4001 |
} |
||
| 4002 |
} |
||
| 4003 | |||
| 4004 |
function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {
|
||
| 4005 |
bytes32 m0; |
||
| 4006 |
bytes32 m1; |
||
| 4007 |
bytes32 m2; |
||
| 4008 |
bytes32 m3; |
||
| 4009 |
bytes32 m4; |
||
| 4010 |
assembly {
|
||
| 4011 |
m0 := mload(0x00) |
||
| 4012 |
m1 := mload(0x20) |
||
| 4013 |
m2 := mload(0x40) |
||
| 4014 |
m3 := mload(0x60) |
||
| 4015 |
m4 := mload(0x80) |
||
| 4016 |
// Selector of `log(address,uint256,address,uint256)`. |
||
| 4017 |
mstore(0x00, 0x100f650e) |
||
| 4018 |
mstore(0x20, p0) |
||
| 4019 |
mstore(0x40, p1) |
||
| 4020 |
mstore(0x60, p2) |
||
| 4021 |
mstore(0x80, p3) |
||
| 4022 |
} |
||
| 4023 |
_sendLogPayload(0x1c, 0x84); |
||
| 4024 |
assembly {
|
||
| 4025 |
mstore(0x00, m0) |
||
| 4026 |
mstore(0x20, m1) |
||
| 4027 |
mstore(0x40, m2) |
||
| 4028 |
mstore(0x60, m3) |
||
| 4029 |
mstore(0x80, m4) |
||
| 4030 |
} |
||
| 4031 |
} |
||
| 4032 | |||
| 4033 |
function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {
|
||
| 4034 |
bytes32 m0; |
||
| 4035 |
bytes32 m1; |
||
| 4036 |
bytes32 m2; |
||
| 4037 |
bytes32 m3; |
||
| 4038 |
bytes32 m4; |
||
| 4039 |
bytes32 m5; |
||
| 4040 |
bytes32 m6; |
||
| 4041 |
assembly {
|
||
| 4042 |
function writeString(pos, w) {
|
||
| 4043 |
let length := 0 |
||
| 4044 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4045 |
mstore(pos, length) |
||
| 4046 |
let shift := sub(256, shl(3, length)) |
||
| 4047 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4048 |
} |
||
| 4049 |
m0 := mload(0x00) |
||
| 4050 |
m1 := mload(0x20) |
||
| 4051 |
m2 := mload(0x40) |
||
| 4052 |
m3 := mload(0x60) |
||
| 4053 |
m4 := mload(0x80) |
||
| 4054 |
m5 := mload(0xa0) |
||
| 4055 |
m6 := mload(0xc0) |
||
| 4056 |
// Selector of `log(address,uint256,address,string)`. |
||
| 4057 |
mstore(0x00, 0x1da986ea) |
||
| 4058 |
mstore(0x20, p0) |
||
| 4059 |
mstore(0x40, p1) |
||
| 4060 |
mstore(0x60, p2) |
||
| 4061 |
mstore(0x80, 0x80) |
||
| 4062 |
writeString(0xa0, p3) |
||
| 4063 |
} |
||
| 4064 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4065 |
assembly {
|
||
| 4066 |
mstore(0x00, m0) |
||
| 4067 |
mstore(0x20, m1) |
||
| 4068 |
mstore(0x40, m2) |
||
| 4069 |
mstore(0x60, m3) |
||
| 4070 |
mstore(0x80, m4) |
||
| 4071 |
mstore(0xa0, m5) |
||
| 4072 |
mstore(0xc0, m6) |
||
| 4073 |
} |
||
| 4074 |
} |
||
| 4075 | |||
| 4076 |
function log(address p0, uint256 p1, bool p2, address p3) internal pure {
|
||
| 4077 |
bytes32 m0; |
||
| 4078 |
bytes32 m1; |
||
| 4079 |
bytes32 m2; |
||
| 4080 |
bytes32 m3; |
||
| 4081 |
bytes32 m4; |
||
| 4082 |
assembly {
|
||
| 4083 |
m0 := mload(0x00) |
||
| 4084 |
m1 := mload(0x20) |
||
| 4085 |
m2 := mload(0x40) |
||
| 4086 |
m3 := mload(0x60) |
||
| 4087 |
m4 := mload(0x80) |
||
| 4088 |
// Selector of `log(address,uint256,bool,address)`. |
||
| 4089 |
mstore(0x00, 0xa31bfdcc) |
||
| 4090 |
mstore(0x20, p0) |
||
| 4091 |
mstore(0x40, p1) |
||
| 4092 |
mstore(0x60, p2) |
||
| 4093 |
mstore(0x80, p3) |
||
| 4094 |
} |
||
| 4095 |
_sendLogPayload(0x1c, 0x84); |
||
| 4096 |
assembly {
|
||
| 4097 |
mstore(0x00, m0) |
||
| 4098 |
mstore(0x20, m1) |
||
| 4099 |
mstore(0x40, m2) |
||
| 4100 |
mstore(0x60, m3) |
||
| 4101 |
mstore(0x80, m4) |
||
| 4102 |
} |
||
| 4103 |
} |
||
| 4104 | |||
| 4105 |
function log(address p0, uint256 p1, bool p2, bool p3) internal pure {
|
||
| 4106 |
bytes32 m0; |
||
| 4107 |
bytes32 m1; |
||
| 4108 |
bytes32 m2; |
||
| 4109 |
bytes32 m3; |
||
| 4110 |
bytes32 m4; |
||
| 4111 |
assembly {
|
||
| 4112 |
m0 := mload(0x00) |
||
| 4113 |
m1 := mload(0x20) |
||
| 4114 |
m2 := mload(0x40) |
||
| 4115 |
m3 := mload(0x60) |
||
| 4116 |
m4 := mload(0x80) |
||
| 4117 |
// Selector of `log(address,uint256,bool,bool)`. |
||
| 4118 |
mstore(0x00, 0x3bf5e537) |
||
| 4119 |
mstore(0x20, p0) |
||
| 4120 |
mstore(0x40, p1) |
||
| 4121 |
mstore(0x60, p2) |
||
| 4122 |
mstore(0x80, p3) |
||
| 4123 |
} |
||
| 4124 |
_sendLogPayload(0x1c, 0x84); |
||
| 4125 |
assembly {
|
||
| 4126 |
mstore(0x00, m0) |
||
| 4127 |
mstore(0x20, m1) |
||
| 4128 |
mstore(0x40, m2) |
||
| 4129 |
mstore(0x60, m3) |
||
| 4130 |
mstore(0x80, m4) |
||
| 4131 |
} |
||
| 4132 |
} |
||
| 4133 | |||
| 4134 |
function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {
|
||
| 4135 |
bytes32 m0; |
||
| 4136 |
bytes32 m1; |
||
| 4137 |
bytes32 m2; |
||
| 4138 |
bytes32 m3; |
||
| 4139 |
bytes32 m4; |
||
| 4140 |
assembly {
|
||
| 4141 |
m0 := mload(0x00) |
||
| 4142 |
m1 := mload(0x20) |
||
| 4143 |
m2 := mload(0x40) |
||
| 4144 |
m3 := mload(0x60) |
||
| 4145 |
m4 := mload(0x80) |
||
| 4146 |
// Selector of `log(address,uint256,bool,uint256)`. |
||
| 4147 |
mstore(0x00, 0x22f6b999) |
||
| 4148 |
mstore(0x20, p0) |
||
| 4149 |
mstore(0x40, p1) |
||
| 4150 |
mstore(0x60, p2) |
||
| 4151 |
mstore(0x80, p3) |
||
| 4152 |
} |
||
| 4153 |
_sendLogPayload(0x1c, 0x84); |
||
| 4154 |
assembly {
|
||
| 4155 |
mstore(0x00, m0) |
||
| 4156 |
mstore(0x20, m1) |
||
| 4157 |
mstore(0x40, m2) |
||
| 4158 |
mstore(0x60, m3) |
||
| 4159 |
mstore(0x80, m4) |
||
| 4160 |
} |
||
| 4161 |
} |
||
| 4162 | |||
| 4163 |
function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {
|
||
| 4164 |
bytes32 m0; |
||
| 4165 |
bytes32 m1; |
||
| 4166 |
bytes32 m2; |
||
| 4167 |
bytes32 m3; |
||
| 4168 |
bytes32 m4; |
||
| 4169 |
bytes32 m5; |
||
| 4170 |
bytes32 m6; |
||
| 4171 |
assembly {
|
||
| 4172 |
function writeString(pos, w) {
|
||
| 4173 |
let length := 0 |
||
| 4174 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4175 |
mstore(pos, length) |
||
| 4176 |
let shift := sub(256, shl(3, length)) |
||
| 4177 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4178 |
} |
||
| 4179 |
m0 := mload(0x00) |
||
| 4180 |
m1 := mload(0x20) |
||
| 4181 |
m2 := mload(0x40) |
||
| 4182 |
m3 := mload(0x60) |
||
| 4183 |
m4 := mload(0x80) |
||
| 4184 |
m5 := mload(0xa0) |
||
| 4185 |
m6 := mload(0xc0) |
||
| 4186 |
// Selector of `log(address,uint256,bool,string)`. |
||
| 4187 |
mstore(0x00, 0xc5ad85f9) |
||
| 4188 |
mstore(0x20, p0) |
||
| 4189 |
mstore(0x40, p1) |
||
| 4190 |
mstore(0x60, p2) |
||
| 4191 |
mstore(0x80, 0x80) |
||
| 4192 |
writeString(0xa0, p3) |
||
| 4193 |
} |
||
| 4194 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4195 |
assembly {
|
||
| 4196 |
mstore(0x00, m0) |
||
| 4197 |
mstore(0x20, m1) |
||
| 4198 |
mstore(0x40, m2) |
||
| 4199 |
mstore(0x60, m3) |
||
| 4200 |
mstore(0x80, m4) |
||
| 4201 |
mstore(0xa0, m5) |
||
| 4202 |
mstore(0xc0, m6) |
||
| 4203 |
} |
||
| 4204 |
} |
||
| 4205 | |||
| 4206 |
function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {
|
||
| 4207 |
bytes32 m0; |
||
| 4208 |
bytes32 m1; |
||
| 4209 |
bytes32 m2; |
||
| 4210 |
bytes32 m3; |
||
| 4211 |
bytes32 m4; |
||
| 4212 |
assembly {
|
||
| 4213 |
m0 := mload(0x00) |
||
| 4214 |
m1 := mload(0x20) |
||
| 4215 |
m2 := mload(0x40) |
||
| 4216 |
m3 := mload(0x60) |
||
| 4217 |
m4 := mload(0x80) |
||
| 4218 |
// Selector of `log(address,uint256,uint256,address)`. |
||
| 4219 |
mstore(0x00, 0x20e3984d) |
||
| 4220 |
mstore(0x20, p0) |
||
| 4221 |
mstore(0x40, p1) |
||
| 4222 |
mstore(0x60, p2) |
||
| 4223 |
mstore(0x80, p3) |
||
| 4224 |
} |
||
| 4225 |
_sendLogPayload(0x1c, 0x84); |
||
| 4226 |
assembly {
|
||
| 4227 |
mstore(0x00, m0) |
||
| 4228 |
mstore(0x20, m1) |
||
| 4229 |
mstore(0x40, m2) |
||
| 4230 |
mstore(0x60, m3) |
||
| 4231 |
mstore(0x80, m4) |
||
| 4232 |
} |
||
| 4233 |
} |
||
| 4234 | |||
| 4235 |
function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {
|
||
| 4236 |
bytes32 m0; |
||
| 4237 |
bytes32 m1; |
||
| 4238 |
bytes32 m2; |
||
| 4239 |
bytes32 m3; |
||
| 4240 |
bytes32 m4; |
||
| 4241 |
assembly {
|
||
| 4242 |
m0 := mload(0x00) |
||
| 4243 |
m1 := mload(0x20) |
||
| 4244 |
m2 := mload(0x40) |
||
| 4245 |
m3 := mload(0x60) |
||
| 4246 |
m4 := mload(0x80) |
||
| 4247 |
// Selector of `log(address,uint256,uint256,bool)`. |
||
| 4248 |
mstore(0x00, 0x66f1bc67) |
||
| 4249 |
mstore(0x20, p0) |
||
| 4250 |
mstore(0x40, p1) |
||
| 4251 |
mstore(0x60, p2) |
||
| 4252 |
mstore(0x80, p3) |
||
| 4253 |
} |
||
| 4254 |
_sendLogPayload(0x1c, 0x84); |
||
| 4255 |
assembly {
|
||
| 4256 |
mstore(0x00, m0) |
||
| 4257 |
mstore(0x20, m1) |
||
| 4258 |
mstore(0x40, m2) |
||
| 4259 |
mstore(0x60, m3) |
||
| 4260 |
mstore(0x80, m4) |
||
| 4261 |
} |
||
| 4262 |
} |
||
| 4263 | |||
| 4264 |
function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 4265 |
bytes32 m0; |
||
| 4266 |
bytes32 m1; |
||
| 4267 |
bytes32 m2; |
||
| 4268 |
bytes32 m3; |
||
| 4269 |
bytes32 m4; |
||
| 4270 |
assembly {
|
||
| 4271 |
m0 := mload(0x00) |
||
| 4272 |
m1 := mload(0x20) |
||
| 4273 |
m2 := mload(0x40) |
||
| 4274 |
m3 := mload(0x60) |
||
| 4275 |
m4 := mload(0x80) |
||
| 4276 |
// Selector of `log(address,uint256,uint256,uint256)`. |
||
| 4277 |
mstore(0x00, 0x34f0e636) |
||
| 4278 |
mstore(0x20, p0) |
||
| 4279 |
mstore(0x40, p1) |
||
| 4280 |
mstore(0x60, p2) |
||
| 4281 |
mstore(0x80, p3) |
||
| 4282 |
} |
||
| 4283 |
_sendLogPayload(0x1c, 0x84); |
||
| 4284 |
assembly {
|
||
| 4285 |
mstore(0x00, m0) |
||
| 4286 |
mstore(0x20, m1) |
||
| 4287 |
mstore(0x40, m2) |
||
| 4288 |
mstore(0x60, m3) |
||
| 4289 |
mstore(0x80, m4) |
||
| 4290 |
} |
||
| 4291 |
} |
||
| 4292 | |||
| 4293 |
function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 4294 |
bytes32 m0; |
||
| 4295 |
bytes32 m1; |
||
| 4296 |
bytes32 m2; |
||
| 4297 |
bytes32 m3; |
||
| 4298 |
bytes32 m4; |
||
| 4299 |
bytes32 m5; |
||
| 4300 |
bytes32 m6; |
||
| 4301 |
assembly {
|
||
| 4302 |
function writeString(pos, w) {
|
||
| 4303 |
let length := 0 |
||
| 4304 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4305 |
mstore(pos, length) |
||
| 4306 |
let shift := sub(256, shl(3, length)) |
||
| 4307 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4308 |
} |
||
| 4309 |
m0 := mload(0x00) |
||
| 4310 |
m1 := mload(0x20) |
||
| 4311 |
m2 := mload(0x40) |
||
| 4312 |
m3 := mload(0x60) |
||
| 4313 |
m4 := mload(0x80) |
||
| 4314 |
m5 := mload(0xa0) |
||
| 4315 |
m6 := mload(0xc0) |
||
| 4316 |
// Selector of `log(address,uint256,uint256,string)`. |
||
| 4317 |
mstore(0x00, 0x4a28c017) |
||
| 4318 |
mstore(0x20, p0) |
||
| 4319 |
mstore(0x40, p1) |
||
| 4320 |
mstore(0x60, p2) |
||
| 4321 |
mstore(0x80, 0x80) |
||
| 4322 |
writeString(0xa0, p3) |
||
| 4323 |
} |
||
| 4324 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4325 |
assembly {
|
||
| 4326 |
mstore(0x00, m0) |
||
| 4327 |
mstore(0x20, m1) |
||
| 4328 |
mstore(0x40, m2) |
||
| 4329 |
mstore(0x60, m3) |
||
| 4330 |
mstore(0x80, m4) |
||
| 4331 |
mstore(0xa0, m5) |
||
| 4332 |
mstore(0xc0, m6) |
||
| 4333 |
} |
||
| 4334 |
} |
||
| 4335 | |||
| 4336 |
function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {
|
||
| 4337 |
bytes32 m0; |
||
| 4338 |
bytes32 m1; |
||
| 4339 |
bytes32 m2; |
||
| 4340 |
bytes32 m3; |
||
| 4341 |
bytes32 m4; |
||
| 4342 |
bytes32 m5; |
||
| 4343 |
bytes32 m6; |
||
| 4344 |
assembly {
|
||
| 4345 |
function writeString(pos, w) {
|
||
| 4346 |
let length := 0 |
||
| 4347 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4348 |
mstore(pos, length) |
||
| 4349 |
let shift := sub(256, shl(3, length)) |
||
| 4350 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4351 |
} |
||
| 4352 |
m0 := mload(0x00) |
||
| 4353 |
m1 := mload(0x20) |
||
| 4354 |
m2 := mload(0x40) |
||
| 4355 |
m3 := mload(0x60) |
||
| 4356 |
m4 := mload(0x80) |
||
| 4357 |
m5 := mload(0xa0) |
||
| 4358 |
m6 := mload(0xc0) |
||
| 4359 |
// Selector of `log(address,uint256,string,address)`. |
||
| 4360 |
mstore(0x00, 0x5c430d47) |
||
| 4361 |
mstore(0x20, p0) |
||
| 4362 |
mstore(0x40, p1) |
||
| 4363 |
mstore(0x60, 0x80) |
||
| 4364 |
mstore(0x80, p3) |
||
| 4365 |
writeString(0xa0, p2) |
||
| 4366 |
} |
||
| 4367 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4368 |
assembly {
|
||
| 4369 |
mstore(0x00, m0) |
||
| 4370 |
mstore(0x20, m1) |
||
| 4371 |
mstore(0x40, m2) |
||
| 4372 |
mstore(0x60, m3) |
||
| 4373 |
mstore(0x80, m4) |
||
| 4374 |
mstore(0xa0, m5) |
||
| 4375 |
mstore(0xc0, m6) |
||
| 4376 |
} |
||
| 4377 |
} |
||
| 4378 | |||
| 4379 |
function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {
|
||
| 4380 |
bytes32 m0; |
||
| 4381 |
bytes32 m1; |
||
| 4382 |
bytes32 m2; |
||
| 4383 |
bytes32 m3; |
||
| 4384 |
bytes32 m4; |
||
| 4385 |
bytes32 m5; |
||
| 4386 |
bytes32 m6; |
||
| 4387 |
assembly {
|
||
| 4388 |
function writeString(pos, w) {
|
||
| 4389 |
let length := 0 |
||
| 4390 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4391 |
mstore(pos, length) |
||
| 4392 |
let shift := sub(256, shl(3, length)) |
||
| 4393 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4394 |
} |
||
| 4395 |
m0 := mload(0x00) |
||
| 4396 |
m1 := mload(0x20) |
||
| 4397 |
m2 := mload(0x40) |
||
| 4398 |
m3 := mload(0x60) |
||
| 4399 |
m4 := mload(0x80) |
||
| 4400 |
m5 := mload(0xa0) |
||
| 4401 |
m6 := mload(0xc0) |
||
| 4402 |
// Selector of `log(address,uint256,string,bool)`. |
||
| 4403 |
mstore(0x00, 0xcf18105c) |
||
| 4404 |
mstore(0x20, p0) |
||
| 4405 |
mstore(0x40, p1) |
||
| 4406 |
mstore(0x60, 0x80) |
||
| 4407 |
mstore(0x80, p3) |
||
| 4408 |
writeString(0xa0, p2) |
||
| 4409 |
} |
||
| 4410 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4411 |
assembly {
|
||
| 4412 |
mstore(0x00, m0) |
||
| 4413 |
mstore(0x20, m1) |
||
| 4414 |
mstore(0x40, m2) |
||
| 4415 |
mstore(0x60, m3) |
||
| 4416 |
mstore(0x80, m4) |
||
| 4417 |
mstore(0xa0, m5) |
||
| 4418 |
mstore(0xc0, m6) |
||
| 4419 |
} |
||
| 4420 |
} |
||
| 4421 | |||
| 4422 |
function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 4423 |
bytes32 m0; |
||
| 4424 |
bytes32 m1; |
||
| 4425 |
bytes32 m2; |
||
| 4426 |
bytes32 m3; |
||
| 4427 |
bytes32 m4; |
||
| 4428 |
bytes32 m5; |
||
| 4429 |
bytes32 m6; |
||
| 4430 |
assembly {
|
||
| 4431 |
function writeString(pos, w) {
|
||
| 4432 |
let length := 0 |
||
| 4433 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4434 |
mstore(pos, length) |
||
| 4435 |
let shift := sub(256, shl(3, length)) |
||
| 4436 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4437 |
} |
||
| 4438 |
m0 := mload(0x00) |
||
| 4439 |
m1 := mload(0x20) |
||
| 4440 |
m2 := mload(0x40) |
||
| 4441 |
m3 := mload(0x60) |
||
| 4442 |
m4 := mload(0x80) |
||
| 4443 |
m5 := mload(0xa0) |
||
| 4444 |
m6 := mload(0xc0) |
||
| 4445 |
// Selector of `log(address,uint256,string,uint256)`. |
||
| 4446 |
mstore(0x00, 0xbf01f891) |
||
| 4447 |
mstore(0x20, p0) |
||
| 4448 |
mstore(0x40, p1) |
||
| 4449 |
mstore(0x60, 0x80) |
||
| 4450 |
mstore(0x80, p3) |
||
| 4451 |
writeString(0xa0, p2) |
||
| 4452 |
} |
||
| 4453 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4454 |
assembly {
|
||
| 4455 |
mstore(0x00, m0) |
||
| 4456 |
mstore(0x20, m1) |
||
| 4457 |
mstore(0x40, m2) |
||
| 4458 |
mstore(0x60, m3) |
||
| 4459 |
mstore(0x80, m4) |
||
| 4460 |
mstore(0xa0, m5) |
||
| 4461 |
mstore(0xc0, m6) |
||
| 4462 |
} |
||
| 4463 |
} |
||
| 4464 | |||
| 4465 |
function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 4466 |
bytes32 m0; |
||
| 4467 |
bytes32 m1; |
||
| 4468 |
bytes32 m2; |
||
| 4469 |
bytes32 m3; |
||
| 4470 |
bytes32 m4; |
||
| 4471 |
bytes32 m5; |
||
| 4472 |
bytes32 m6; |
||
| 4473 |
bytes32 m7; |
||
| 4474 |
bytes32 m8; |
||
| 4475 |
assembly {
|
||
| 4476 |
function writeString(pos, w) {
|
||
| 4477 |
let length := 0 |
||
| 4478 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4479 |
mstore(pos, length) |
||
| 4480 |
let shift := sub(256, shl(3, length)) |
||
| 4481 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4482 |
} |
||
| 4483 |
m0 := mload(0x00) |
||
| 4484 |
m1 := mload(0x20) |
||
| 4485 |
m2 := mload(0x40) |
||
| 4486 |
m3 := mload(0x60) |
||
| 4487 |
m4 := mload(0x80) |
||
| 4488 |
m5 := mload(0xa0) |
||
| 4489 |
m6 := mload(0xc0) |
||
| 4490 |
m7 := mload(0xe0) |
||
| 4491 |
m8 := mload(0x100) |
||
| 4492 |
// Selector of `log(address,uint256,string,string)`. |
||
| 4493 |
mstore(0x00, 0x88a8c406) |
||
| 4494 |
mstore(0x20, p0) |
||
| 4495 |
mstore(0x40, p1) |
||
| 4496 |
mstore(0x60, 0x80) |
||
| 4497 |
mstore(0x80, 0xc0) |
||
| 4498 |
writeString(0xa0, p2) |
||
| 4499 |
writeString(0xe0, p3) |
||
| 4500 |
} |
||
| 4501 |
_sendLogPayload(0x1c, 0x104); |
||
| 4502 |
assembly {
|
||
| 4503 |
mstore(0x00, m0) |
||
| 4504 |
mstore(0x20, m1) |
||
| 4505 |
mstore(0x40, m2) |
||
| 4506 |
mstore(0x60, m3) |
||
| 4507 |
mstore(0x80, m4) |
||
| 4508 |
mstore(0xa0, m5) |
||
| 4509 |
mstore(0xc0, m6) |
||
| 4510 |
mstore(0xe0, m7) |
||
| 4511 |
mstore(0x100, m8) |
||
| 4512 |
} |
||
| 4513 |
} |
||
| 4514 | |||
| 4515 |
function log(address p0, bytes32 p1, address p2, address p3) internal pure {
|
||
| 4516 |
bytes32 m0; |
||
| 4517 |
bytes32 m1; |
||
| 4518 |
bytes32 m2; |
||
| 4519 |
bytes32 m3; |
||
| 4520 |
bytes32 m4; |
||
| 4521 |
bytes32 m5; |
||
| 4522 |
bytes32 m6; |
||
| 4523 |
assembly {
|
||
| 4524 |
function writeString(pos, w) {
|
||
| 4525 |
let length := 0 |
||
| 4526 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4527 |
mstore(pos, length) |
||
| 4528 |
let shift := sub(256, shl(3, length)) |
||
| 4529 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4530 |
} |
||
| 4531 |
m0 := mload(0x00) |
||
| 4532 |
m1 := mload(0x20) |
||
| 4533 |
m2 := mload(0x40) |
||
| 4534 |
m3 := mload(0x60) |
||
| 4535 |
m4 := mload(0x80) |
||
| 4536 |
m5 := mload(0xa0) |
||
| 4537 |
m6 := mload(0xc0) |
||
| 4538 |
// Selector of `log(address,string,address,address)`. |
||
| 4539 |
mstore(0x00, 0x0d36fa20) |
||
| 4540 |
mstore(0x20, p0) |
||
| 4541 |
mstore(0x40, 0x80) |
||
| 4542 |
mstore(0x60, p2) |
||
| 4543 |
mstore(0x80, p3) |
||
| 4544 |
writeString(0xa0, p1) |
||
| 4545 |
} |
||
| 4546 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4547 |
assembly {
|
||
| 4548 |
mstore(0x00, m0) |
||
| 4549 |
mstore(0x20, m1) |
||
| 4550 |
mstore(0x40, m2) |
||
| 4551 |
mstore(0x60, m3) |
||
| 4552 |
mstore(0x80, m4) |
||
| 4553 |
mstore(0xa0, m5) |
||
| 4554 |
mstore(0xc0, m6) |
||
| 4555 |
} |
||
| 4556 |
} |
||
| 4557 | |||
| 4558 |
function log(address p0, bytes32 p1, address p2, bool p3) internal pure {
|
||
| 4559 |
bytes32 m0; |
||
| 4560 |
bytes32 m1; |
||
| 4561 |
bytes32 m2; |
||
| 4562 |
bytes32 m3; |
||
| 4563 |
bytes32 m4; |
||
| 4564 |
bytes32 m5; |
||
| 4565 |
bytes32 m6; |
||
| 4566 |
assembly {
|
||
| 4567 |
function writeString(pos, w) {
|
||
| 4568 |
let length := 0 |
||
| 4569 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4570 |
mstore(pos, length) |
||
| 4571 |
let shift := sub(256, shl(3, length)) |
||
| 4572 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4573 |
} |
||
| 4574 |
m0 := mload(0x00) |
||
| 4575 |
m1 := mload(0x20) |
||
| 4576 |
m2 := mload(0x40) |
||
| 4577 |
m3 := mload(0x60) |
||
| 4578 |
m4 := mload(0x80) |
||
| 4579 |
m5 := mload(0xa0) |
||
| 4580 |
m6 := mload(0xc0) |
||
| 4581 |
// Selector of `log(address,string,address,bool)`. |
||
| 4582 |
mstore(0x00, 0x0df12b76) |
||
| 4583 |
mstore(0x20, p0) |
||
| 4584 |
mstore(0x40, 0x80) |
||
| 4585 |
mstore(0x60, p2) |
||
| 4586 |
mstore(0x80, p3) |
||
| 4587 |
writeString(0xa0, p1) |
||
| 4588 |
} |
||
| 4589 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4590 |
assembly {
|
||
| 4591 |
mstore(0x00, m0) |
||
| 4592 |
mstore(0x20, m1) |
||
| 4593 |
mstore(0x40, m2) |
||
| 4594 |
mstore(0x60, m3) |
||
| 4595 |
mstore(0x80, m4) |
||
| 4596 |
mstore(0xa0, m5) |
||
| 4597 |
mstore(0xc0, m6) |
||
| 4598 |
} |
||
| 4599 |
} |
||
| 4600 | |||
| 4601 |
function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {
|
||
| 4602 |
bytes32 m0; |
||
| 4603 |
bytes32 m1; |
||
| 4604 |
bytes32 m2; |
||
| 4605 |
bytes32 m3; |
||
| 4606 |
bytes32 m4; |
||
| 4607 |
bytes32 m5; |
||
| 4608 |
bytes32 m6; |
||
| 4609 |
assembly {
|
||
| 4610 |
function writeString(pos, w) {
|
||
| 4611 |
let length := 0 |
||
| 4612 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4613 |
mstore(pos, length) |
||
| 4614 |
let shift := sub(256, shl(3, length)) |
||
| 4615 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4616 |
} |
||
| 4617 |
m0 := mload(0x00) |
||
| 4618 |
m1 := mload(0x20) |
||
| 4619 |
m2 := mload(0x40) |
||
| 4620 |
m3 := mload(0x60) |
||
| 4621 |
m4 := mload(0x80) |
||
| 4622 |
m5 := mload(0xa0) |
||
| 4623 |
m6 := mload(0xc0) |
||
| 4624 |
// Selector of `log(address,string,address,uint256)`. |
||
| 4625 |
mstore(0x00, 0x457fe3cf) |
||
| 4626 |
mstore(0x20, p0) |
||
| 4627 |
mstore(0x40, 0x80) |
||
| 4628 |
mstore(0x60, p2) |
||
| 4629 |
mstore(0x80, p3) |
||
| 4630 |
writeString(0xa0, p1) |
||
| 4631 |
} |
||
| 4632 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4633 |
assembly {
|
||
| 4634 |
mstore(0x00, m0) |
||
| 4635 |
mstore(0x20, m1) |
||
| 4636 |
mstore(0x40, m2) |
||
| 4637 |
mstore(0x60, m3) |
||
| 4638 |
mstore(0x80, m4) |
||
| 4639 |
mstore(0xa0, m5) |
||
| 4640 |
mstore(0xc0, m6) |
||
| 4641 |
} |
||
| 4642 |
} |
||
| 4643 | |||
| 4644 |
function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {
|
||
| 4645 |
bytes32 m0; |
||
| 4646 |
bytes32 m1; |
||
| 4647 |
bytes32 m2; |
||
| 4648 |
bytes32 m3; |
||
| 4649 |
bytes32 m4; |
||
| 4650 |
bytes32 m5; |
||
| 4651 |
bytes32 m6; |
||
| 4652 |
bytes32 m7; |
||
| 4653 |
bytes32 m8; |
||
| 4654 |
assembly {
|
||
| 4655 |
function writeString(pos, w) {
|
||
| 4656 |
let length := 0 |
||
| 4657 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4658 |
mstore(pos, length) |
||
| 4659 |
let shift := sub(256, shl(3, length)) |
||
| 4660 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4661 |
} |
||
| 4662 |
m0 := mload(0x00) |
||
| 4663 |
m1 := mload(0x20) |
||
| 4664 |
m2 := mload(0x40) |
||
| 4665 |
m3 := mload(0x60) |
||
| 4666 |
m4 := mload(0x80) |
||
| 4667 |
m5 := mload(0xa0) |
||
| 4668 |
m6 := mload(0xc0) |
||
| 4669 |
m7 := mload(0xe0) |
||
| 4670 |
m8 := mload(0x100) |
||
| 4671 |
// Selector of `log(address,string,address,string)`. |
||
| 4672 |
mstore(0x00, 0xf7e36245) |
||
| 4673 |
mstore(0x20, p0) |
||
| 4674 |
mstore(0x40, 0x80) |
||
| 4675 |
mstore(0x60, p2) |
||
| 4676 |
mstore(0x80, 0xc0) |
||
| 4677 |
writeString(0xa0, p1) |
||
| 4678 |
writeString(0xe0, p3) |
||
| 4679 |
} |
||
| 4680 |
_sendLogPayload(0x1c, 0x104); |
||
| 4681 |
assembly {
|
||
| 4682 |
mstore(0x00, m0) |
||
| 4683 |
mstore(0x20, m1) |
||
| 4684 |
mstore(0x40, m2) |
||
| 4685 |
mstore(0x60, m3) |
||
| 4686 |
mstore(0x80, m4) |
||
| 4687 |
mstore(0xa0, m5) |
||
| 4688 |
mstore(0xc0, m6) |
||
| 4689 |
mstore(0xe0, m7) |
||
| 4690 |
mstore(0x100, m8) |
||
| 4691 |
} |
||
| 4692 |
} |
||
| 4693 | |||
| 4694 |
function log(address p0, bytes32 p1, bool p2, address p3) internal pure {
|
||
| 4695 |
bytes32 m0; |
||
| 4696 |
bytes32 m1; |
||
| 4697 |
bytes32 m2; |
||
| 4698 |
bytes32 m3; |
||
| 4699 |
bytes32 m4; |
||
| 4700 |
bytes32 m5; |
||
| 4701 |
bytes32 m6; |
||
| 4702 |
assembly {
|
||
| 4703 |
function writeString(pos, w) {
|
||
| 4704 |
let length := 0 |
||
| 4705 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4706 |
mstore(pos, length) |
||
| 4707 |
let shift := sub(256, shl(3, length)) |
||
| 4708 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4709 |
} |
||
| 4710 |
m0 := mload(0x00) |
||
| 4711 |
m1 := mload(0x20) |
||
| 4712 |
m2 := mload(0x40) |
||
| 4713 |
m3 := mload(0x60) |
||
| 4714 |
m4 := mload(0x80) |
||
| 4715 |
m5 := mload(0xa0) |
||
| 4716 |
m6 := mload(0xc0) |
||
| 4717 |
// Selector of `log(address,string,bool,address)`. |
||
| 4718 |
mstore(0x00, 0x205871c2) |
||
| 4719 |
mstore(0x20, p0) |
||
| 4720 |
mstore(0x40, 0x80) |
||
| 4721 |
mstore(0x60, p2) |
||
| 4722 |
mstore(0x80, p3) |
||
| 4723 |
writeString(0xa0, p1) |
||
| 4724 |
} |
||
| 4725 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4726 |
assembly {
|
||
| 4727 |
mstore(0x00, m0) |
||
| 4728 |
mstore(0x20, m1) |
||
| 4729 |
mstore(0x40, m2) |
||
| 4730 |
mstore(0x60, m3) |
||
| 4731 |
mstore(0x80, m4) |
||
| 4732 |
mstore(0xa0, m5) |
||
| 4733 |
mstore(0xc0, m6) |
||
| 4734 |
} |
||
| 4735 |
} |
||
| 4736 | |||
| 4737 |
function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {
|
||
| 4738 |
bytes32 m0; |
||
| 4739 |
bytes32 m1; |
||
| 4740 |
bytes32 m2; |
||
| 4741 |
bytes32 m3; |
||
| 4742 |
bytes32 m4; |
||
| 4743 |
bytes32 m5; |
||
| 4744 |
bytes32 m6; |
||
| 4745 |
assembly {
|
||
| 4746 |
function writeString(pos, w) {
|
||
| 4747 |
let length := 0 |
||
| 4748 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4749 |
mstore(pos, length) |
||
| 4750 |
let shift := sub(256, shl(3, length)) |
||
| 4751 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4752 |
} |
||
| 4753 |
m0 := mload(0x00) |
||
| 4754 |
m1 := mload(0x20) |
||
| 4755 |
m2 := mload(0x40) |
||
| 4756 |
m3 := mload(0x60) |
||
| 4757 |
m4 := mload(0x80) |
||
| 4758 |
m5 := mload(0xa0) |
||
| 4759 |
m6 := mload(0xc0) |
||
| 4760 |
// Selector of `log(address,string,bool,bool)`. |
||
| 4761 |
mstore(0x00, 0x5f1d5c9f) |
||
| 4762 |
mstore(0x20, p0) |
||
| 4763 |
mstore(0x40, 0x80) |
||
| 4764 |
mstore(0x60, p2) |
||
| 4765 |
mstore(0x80, p3) |
||
| 4766 |
writeString(0xa0, p1) |
||
| 4767 |
} |
||
| 4768 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4769 |
assembly {
|
||
| 4770 |
mstore(0x00, m0) |
||
| 4771 |
mstore(0x20, m1) |
||
| 4772 |
mstore(0x40, m2) |
||
| 4773 |
mstore(0x60, m3) |
||
| 4774 |
mstore(0x80, m4) |
||
| 4775 |
mstore(0xa0, m5) |
||
| 4776 |
mstore(0xc0, m6) |
||
| 4777 |
} |
||
| 4778 |
} |
||
| 4779 | |||
| 4780 |
function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {
|
||
| 4781 |
bytes32 m0; |
||
| 4782 |
bytes32 m1; |
||
| 4783 |
bytes32 m2; |
||
| 4784 |
bytes32 m3; |
||
| 4785 |
bytes32 m4; |
||
| 4786 |
bytes32 m5; |
||
| 4787 |
bytes32 m6; |
||
| 4788 |
assembly {
|
||
| 4789 |
function writeString(pos, w) {
|
||
| 4790 |
let length := 0 |
||
| 4791 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4792 |
mstore(pos, length) |
||
| 4793 |
let shift := sub(256, shl(3, length)) |
||
| 4794 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4795 |
} |
||
| 4796 |
m0 := mload(0x00) |
||
| 4797 |
m1 := mload(0x20) |
||
| 4798 |
m2 := mload(0x40) |
||
| 4799 |
m3 := mload(0x60) |
||
| 4800 |
m4 := mload(0x80) |
||
| 4801 |
m5 := mload(0xa0) |
||
| 4802 |
m6 := mload(0xc0) |
||
| 4803 |
// Selector of `log(address,string,bool,uint256)`. |
||
| 4804 |
mstore(0x00, 0x515e38b6) |
||
| 4805 |
mstore(0x20, p0) |
||
| 4806 |
mstore(0x40, 0x80) |
||
| 4807 |
mstore(0x60, p2) |
||
| 4808 |
mstore(0x80, p3) |
||
| 4809 |
writeString(0xa0, p1) |
||
| 4810 |
} |
||
| 4811 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4812 |
assembly {
|
||
| 4813 |
mstore(0x00, m0) |
||
| 4814 |
mstore(0x20, m1) |
||
| 4815 |
mstore(0x40, m2) |
||
| 4816 |
mstore(0x60, m3) |
||
| 4817 |
mstore(0x80, m4) |
||
| 4818 |
mstore(0xa0, m5) |
||
| 4819 |
mstore(0xc0, m6) |
||
| 4820 |
} |
||
| 4821 |
} |
||
| 4822 | |||
| 4823 |
function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {
|
||
| 4824 |
bytes32 m0; |
||
| 4825 |
bytes32 m1; |
||
| 4826 |
bytes32 m2; |
||
| 4827 |
bytes32 m3; |
||
| 4828 |
bytes32 m4; |
||
| 4829 |
bytes32 m5; |
||
| 4830 |
bytes32 m6; |
||
| 4831 |
bytes32 m7; |
||
| 4832 |
bytes32 m8; |
||
| 4833 |
assembly {
|
||
| 4834 |
function writeString(pos, w) {
|
||
| 4835 |
let length := 0 |
||
| 4836 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4837 |
mstore(pos, length) |
||
| 4838 |
let shift := sub(256, shl(3, length)) |
||
| 4839 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4840 |
} |
||
| 4841 |
m0 := mload(0x00) |
||
| 4842 |
m1 := mload(0x20) |
||
| 4843 |
m2 := mload(0x40) |
||
| 4844 |
m3 := mload(0x60) |
||
| 4845 |
m4 := mload(0x80) |
||
| 4846 |
m5 := mload(0xa0) |
||
| 4847 |
m6 := mload(0xc0) |
||
| 4848 |
m7 := mload(0xe0) |
||
| 4849 |
m8 := mload(0x100) |
||
| 4850 |
// Selector of `log(address,string,bool,string)`. |
||
| 4851 |
mstore(0x00, 0xbc0b61fe) |
||
| 4852 |
mstore(0x20, p0) |
||
| 4853 |
mstore(0x40, 0x80) |
||
| 4854 |
mstore(0x60, p2) |
||
| 4855 |
mstore(0x80, 0xc0) |
||
| 4856 |
writeString(0xa0, p1) |
||
| 4857 |
writeString(0xe0, p3) |
||
| 4858 |
} |
||
| 4859 |
_sendLogPayload(0x1c, 0x104); |
||
| 4860 |
assembly {
|
||
| 4861 |
mstore(0x00, m0) |
||
| 4862 |
mstore(0x20, m1) |
||
| 4863 |
mstore(0x40, m2) |
||
| 4864 |
mstore(0x60, m3) |
||
| 4865 |
mstore(0x80, m4) |
||
| 4866 |
mstore(0xa0, m5) |
||
| 4867 |
mstore(0xc0, m6) |
||
| 4868 |
mstore(0xe0, m7) |
||
| 4869 |
mstore(0x100, m8) |
||
| 4870 |
} |
||
| 4871 |
} |
||
| 4872 | |||
| 4873 |
function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {
|
||
| 4874 |
bytes32 m0; |
||
| 4875 |
bytes32 m1; |
||
| 4876 |
bytes32 m2; |
||
| 4877 |
bytes32 m3; |
||
| 4878 |
bytes32 m4; |
||
| 4879 |
bytes32 m5; |
||
| 4880 |
bytes32 m6; |
||
| 4881 |
assembly {
|
||
| 4882 |
function writeString(pos, w) {
|
||
| 4883 |
let length := 0 |
||
| 4884 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4885 |
mstore(pos, length) |
||
| 4886 |
let shift := sub(256, shl(3, length)) |
||
| 4887 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4888 |
} |
||
| 4889 |
m0 := mload(0x00) |
||
| 4890 |
m1 := mload(0x20) |
||
| 4891 |
m2 := mload(0x40) |
||
| 4892 |
m3 := mload(0x60) |
||
| 4893 |
m4 := mload(0x80) |
||
| 4894 |
m5 := mload(0xa0) |
||
| 4895 |
m6 := mload(0xc0) |
||
| 4896 |
// Selector of `log(address,string,uint256,address)`. |
||
| 4897 |
mstore(0x00, 0x63183678) |
||
| 4898 |
mstore(0x20, p0) |
||
| 4899 |
mstore(0x40, 0x80) |
||
| 4900 |
mstore(0x60, p2) |
||
| 4901 |
mstore(0x80, p3) |
||
| 4902 |
writeString(0xa0, p1) |
||
| 4903 |
} |
||
| 4904 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4905 |
assembly {
|
||
| 4906 |
mstore(0x00, m0) |
||
| 4907 |
mstore(0x20, m1) |
||
| 4908 |
mstore(0x40, m2) |
||
| 4909 |
mstore(0x60, m3) |
||
| 4910 |
mstore(0x80, m4) |
||
| 4911 |
mstore(0xa0, m5) |
||
| 4912 |
mstore(0xc0, m6) |
||
| 4913 |
} |
||
| 4914 |
} |
||
| 4915 | |||
| 4916 |
function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {
|
||
| 4917 |
bytes32 m0; |
||
| 4918 |
bytes32 m1; |
||
| 4919 |
bytes32 m2; |
||
| 4920 |
bytes32 m3; |
||
| 4921 |
bytes32 m4; |
||
| 4922 |
bytes32 m5; |
||
| 4923 |
bytes32 m6; |
||
| 4924 |
assembly {
|
||
| 4925 |
function writeString(pos, w) {
|
||
| 4926 |
let length := 0 |
||
| 4927 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4928 |
mstore(pos, length) |
||
| 4929 |
let shift := sub(256, shl(3, length)) |
||
| 4930 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4931 |
} |
||
| 4932 |
m0 := mload(0x00) |
||
| 4933 |
m1 := mload(0x20) |
||
| 4934 |
m2 := mload(0x40) |
||
| 4935 |
m3 := mload(0x60) |
||
| 4936 |
m4 := mload(0x80) |
||
| 4937 |
m5 := mload(0xa0) |
||
| 4938 |
m6 := mload(0xc0) |
||
| 4939 |
// Selector of `log(address,string,uint256,bool)`. |
||
| 4940 |
mstore(0x00, 0x0ef7e050) |
||
| 4941 |
mstore(0x20, p0) |
||
| 4942 |
mstore(0x40, 0x80) |
||
| 4943 |
mstore(0x60, p2) |
||
| 4944 |
mstore(0x80, p3) |
||
| 4945 |
writeString(0xa0, p1) |
||
| 4946 |
} |
||
| 4947 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4948 |
assembly {
|
||
| 4949 |
mstore(0x00, m0) |
||
| 4950 |
mstore(0x20, m1) |
||
| 4951 |
mstore(0x40, m2) |
||
| 4952 |
mstore(0x60, m3) |
||
| 4953 |
mstore(0x80, m4) |
||
| 4954 |
mstore(0xa0, m5) |
||
| 4955 |
mstore(0xc0, m6) |
||
| 4956 |
} |
||
| 4957 |
} |
||
| 4958 | |||
| 4959 |
function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 4960 |
bytes32 m0; |
||
| 4961 |
bytes32 m1; |
||
| 4962 |
bytes32 m2; |
||
| 4963 |
bytes32 m3; |
||
| 4964 |
bytes32 m4; |
||
| 4965 |
bytes32 m5; |
||
| 4966 |
bytes32 m6; |
||
| 4967 |
assembly {
|
||
| 4968 |
function writeString(pos, w) {
|
||
| 4969 |
let length := 0 |
||
| 4970 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 4971 |
mstore(pos, length) |
||
| 4972 |
let shift := sub(256, shl(3, length)) |
||
| 4973 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 4974 |
} |
||
| 4975 |
m0 := mload(0x00) |
||
| 4976 |
m1 := mload(0x20) |
||
| 4977 |
m2 := mload(0x40) |
||
| 4978 |
m3 := mload(0x60) |
||
| 4979 |
m4 := mload(0x80) |
||
| 4980 |
m5 := mload(0xa0) |
||
| 4981 |
m6 := mload(0xc0) |
||
| 4982 |
// Selector of `log(address,string,uint256,uint256)`. |
||
| 4983 |
mstore(0x00, 0x1dc8e1b8) |
||
| 4984 |
mstore(0x20, p0) |
||
| 4985 |
mstore(0x40, 0x80) |
||
| 4986 |
mstore(0x60, p2) |
||
| 4987 |
mstore(0x80, p3) |
||
| 4988 |
writeString(0xa0, p1) |
||
| 4989 |
} |
||
| 4990 |
_sendLogPayload(0x1c, 0xc4); |
||
| 4991 |
assembly {
|
||
| 4992 |
mstore(0x00, m0) |
||
| 4993 |
mstore(0x20, m1) |
||
| 4994 |
mstore(0x40, m2) |
||
| 4995 |
mstore(0x60, m3) |
||
| 4996 |
mstore(0x80, m4) |
||
| 4997 |
mstore(0xa0, m5) |
||
| 4998 |
mstore(0xc0, m6) |
||
| 4999 |
} |
||
| 5000 |
} |
||
| 5001 | |||
| 5002 |
function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 5003 |
bytes32 m0; |
||
| 5004 |
bytes32 m1; |
||
| 5005 |
bytes32 m2; |
||
| 5006 |
bytes32 m3; |
||
| 5007 |
bytes32 m4; |
||
| 5008 |
bytes32 m5; |
||
| 5009 |
bytes32 m6; |
||
| 5010 |
bytes32 m7; |
||
| 5011 |
bytes32 m8; |
||
| 5012 |
assembly {
|
||
| 5013 |
function writeString(pos, w) {
|
||
| 5014 |
let length := 0 |
||
| 5015 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5016 |
mstore(pos, length) |
||
| 5017 |
let shift := sub(256, shl(3, length)) |
||
| 5018 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5019 |
} |
||
| 5020 |
m0 := mload(0x00) |
||
| 5021 |
m1 := mload(0x20) |
||
| 5022 |
m2 := mload(0x40) |
||
| 5023 |
m3 := mload(0x60) |
||
| 5024 |
m4 := mload(0x80) |
||
| 5025 |
m5 := mload(0xa0) |
||
| 5026 |
m6 := mload(0xc0) |
||
| 5027 |
m7 := mload(0xe0) |
||
| 5028 |
m8 := mload(0x100) |
||
| 5029 |
// Selector of `log(address,string,uint256,string)`. |
||
| 5030 |
mstore(0x00, 0x448830a8) |
||
| 5031 |
mstore(0x20, p0) |
||
| 5032 |
mstore(0x40, 0x80) |
||
| 5033 |
mstore(0x60, p2) |
||
| 5034 |
mstore(0x80, 0xc0) |
||
| 5035 |
writeString(0xa0, p1) |
||
| 5036 |
writeString(0xe0, p3) |
||
| 5037 |
} |
||
| 5038 |
_sendLogPayload(0x1c, 0x104); |
||
| 5039 |
assembly {
|
||
| 5040 |
mstore(0x00, m0) |
||
| 5041 |
mstore(0x20, m1) |
||
| 5042 |
mstore(0x40, m2) |
||
| 5043 |
mstore(0x60, m3) |
||
| 5044 |
mstore(0x80, m4) |
||
| 5045 |
mstore(0xa0, m5) |
||
| 5046 |
mstore(0xc0, m6) |
||
| 5047 |
mstore(0xe0, m7) |
||
| 5048 |
mstore(0x100, m8) |
||
| 5049 |
} |
||
| 5050 |
} |
||
| 5051 | |||
| 5052 |
function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {
|
||
| 5053 |
bytes32 m0; |
||
| 5054 |
bytes32 m1; |
||
| 5055 |
bytes32 m2; |
||
| 5056 |
bytes32 m3; |
||
| 5057 |
bytes32 m4; |
||
| 5058 |
bytes32 m5; |
||
| 5059 |
bytes32 m6; |
||
| 5060 |
bytes32 m7; |
||
| 5061 |
bytes32 m8; |
||
| 5062 |
assembly {
|
||
| 5063 |
function writeString(pos, w) {
|
||
| 5064 |
let length := 0 |
||
| 5065 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5066 |
mstore(pos, length) |
||
| 5067 |
let shift := sub(256, shl(3, length)) |
||
| 5068 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5069 |
} |
||
| 5070 |
m0 := mload(0x00) |
||
| 5071 |
m1 := mload(0x20) |
||
| 5072 |
m2 := mload(0x40) |
||
| 5073 |
m3 := mload(0x60) |
||
| 5074 |
m4 := mload(0x80) |
||
| 5075 |
m5 := mload(0xa0) |
||
| 5076 |
m6 := mload(0xc0) |
||
| 5077 |
m7 := mload(0xe0) |
||
| 5078 |
m8 := mload(0x100) |
||
| 5079 |
// Selector of `log(address,string,string,address)`. |
||
| 5080 |
mstore(0x00, 0xa04e2f87) |
||
| 5081 |
mstore(0x20, p0) |
||
| 5082 |
mstore(0x40, 0x80) |
||
| 5083 |
mstore(0x60, 0xc0) |
||
| 5084 |
mstore(0x80, p3) |
||
| 5085 |
writeString(0xa0, p1) |
||
| 5086 |
writeString(0xe0, p2) |
||
| 5087 |
} |
||
| 5088 |
_sendLogPayload(0x1c, 0x104); |
||
| 5089 |
assembly {
|
||
| 5090 |
mstore(0x00, m0) |
||
| 5091 |
mstore(0x20, m1) |
||
| 5092 |
mstore(0x40, m2) |
||
| 5093 |
mstore(0x60, m3) |
||
| 5094 |
mstore(0x80, m4) |
||
| 5095 |
mstore(0xa0, m5) |
||
| 5096 |
mstore(0xc0, m6) |
||
| 5097 |
mstore(0xe0, m7) |
||
| 5098 |
mstore(0x100, m8) |
||
| 5099 |
} |
||
| 5100 |
} |
||
| 5101 | |||
| 5102 |
function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {
|
||
| 5103 |
bytes32 m0; |
||
| 5104 |
bytes32 m1; |
||
| 5105 |
bytes32 m2; |
||
| 5106 |
bytes32 m3; |
||
| 5107 |
bytes32 m4; |
||
| 5108 |
bytes32 m5; |
||
| 5109 |
bytes32 m6; |
||
| 5110 |
bytes32 m7; |
||
| 5111 |
bytes32 m8; |
||
| 5112 |
assembly {
|
||
| 5113 |
function writeString(pos, w) {
|
||
| 5114 |
let length := 0 |
||
| 5115 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5116 |
mstore(pos, length) |
||
| 5117 |
let shift := sub(256, shl(3, length)) |
||
| 5118 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5119 |
} |
||
| 5120 |
m0 := mload(0x00) |
||
| 5121 |
m1 := mload(0x20) |
||
| 5122 |
m2 := mload(0x40) |
||
| 5123 |
m3 := mload(0x60) |
||
| 5124 |
m4 := mload(0x80) |
||
| 5125 |
m5 := mload(0xa0) |
||
| 5126 |
m6 := mload(0xc0) |
||
| 5127 |
m7 := mload(0xe0) |
||
| 5128 |
m8 := mload(0x100) |
||
| 5129 |
// Selector of `log(address,string,string,bool)`. |
||
| 5130 |
mstore(0x00, 0x35a5071f) |
||
| 5131 |
mstore(0x20, p0) |
||
| 5132 |
mstore(0x40, 0x80) |
||
| 5133 |
mstore(0x60, 0xc0) |
||
| 5134 |
mstore(0x80, p3) |
||
| 5135 |
writeString(0xa0, p1) |
||
| 5136 |
writeString(0xe0, p2) |
||
| 5137 |
} |
||
| 5138 |
_sendLogPayload(0x1c, 0x104); |
||
| 5139 |
assembly {
|
||
| 5140 |
mstore(0x00, m0) |
||
| 5141 |
mstore(0x20, m1) |
||
| 5142 |
mstore(0x40, m2) |
||
| 5143 |
mstore(0x60, m3) |
||
| 5144 |
mstore(0x80, m4) |
||
| 5145 |
mstore(0xa0, m5) |
||
| 5146 |
mstore(0xc0, m6) |
||
| 5147 |
mstore(0xe0, m7) |
||
| 5148 |
mstore(0x100, m8) |
||
| 5149 |
} |
||
| 5150 |
} |
||
| 5151 | |||
| 5152 |
function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 5153 |
bytes32 m0; |
||
| 5154 |
bytes32 m1; |
||
| 5155 |
bytes32 m2; |
||
| 5156 |
bytes32 m3; |
||
| 5157 |
bytes32 m4; |
||
| 5158 |
bytes32 m5; |
||
| 5159 |
bytes32 m6; |
||
| 5160 |
bytes32 m7; |
||
| 5161 |
bytes32 m8; |
||
| 5162 |
assembly {
|
||
| 5163 |
function writeString(pos, w) {
|
||
| 5164 |
let length := 0 |
||
| 5165 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5166 |
mstore(pos, length) |
||
| 5167 |
let shift := sub(256, shl(3, length)) |
||
| 5168 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5169 |
} |
||
| 5170 |
m0 := mload(0x00) |
||
| 5171 |
m1 := mload(0x20) |
||
| 5172 |
m2 := mload(0x40) |
||
| 5173 |
m3 := mload(0x60) |
||
| 5174 |
m4 := mload(0x80) |
||
| 5175 |
m5 := mload(0xa0) |
||
| 5176 |
m6 := mload(0xc0) |
||
| 5177 |
m7 := mload(0xe0) |
||
| 5178 |
m8 := mload(0x100) |
||
| 5179 |
// Selector of `log(address,string,string,uint256)`. |
||
| 5180 |
mstore(0x00, 0x159f8927) |
||
| 5181 |
mstore(0x20, p0) |
||
| 5182 |
mstore(0x40, 0x80) |
||
| 5183 |
mstore(0x60, 0xc0) |
||
| 5184 |
mstore(0x80, p3) |
||
| 5185 |
writeString(0xa0, p1) |
||
| 5186 |
writeString(0xe0, p2) |
||
| 5187 |
} |
||
| 5188 |
_sendLogPayload(0x1c, 0x104); |
||
| 5189 |
assembly {
|
||
| 5190 |
mstore(0x00, m0) |
||
| 5191 |
mstore(0x20, m1) |
||
| 5192 |
mstore(0x40, m2) |
||
| 5193 |
mstore(0x60, m3) |
||
| 5194 |
mstore(0x80, m4) |
||
| 5195 |
mstore(0xa0, m5) |
||
| 5196 |
mstore(0xc0, m6) |
||
| 5197 |
mstore(0xe0, m7) |
||
| 5198 |
mstore(0x100, m8) |
||
| 5199 |
} |
||
| 5200 |
} |
||
| 5201 | |||
| 5202 |
function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 5203 |
bytes32 m0; |
||
| 5204 |
bytes32 m1; |
||
| 5205 |
bytes32 m2; |
||
| 5206 |
bytes32 m3; |
||
| 5207 |
bytes32 m4; |
||
| 5208 |
bytes32 m5; |
||
| 5209 |
bytes32 m6; |
||
| 5210 |
bytes32 m7; |
||
| 5211 |
bytes32 m8; |
||
| 5212 |
bytes32 m9; |
||
| 5213 |
bytes32 m10; |
||
| 5214 |
assembly {
|
||
| 5215 |
function writeString(pos, w) {
|
||
| 5216 |
let length := 0 |
||
| 5217 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5218 |
mstore(pos, length) |
||
| 5219 |
let shift := sub(256, shl(3, length)) |
||
| 5220 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5221 |
} |
||
| 5222 |
m0 := mload(0x00) |
||
| 5223 |
m1 := mload(0x20) |
||
| 5224 |
m2 := mload(0x40) |
||
| 5225 |
m3 := mload(0x60) |
||
| 5226 |
m4 := mload(0x80) |
||
| 5227 |
m5 := mload(0xa0) |
||
| 5228 |
m6 := mload(0xc0) |
||
| 5229 |
m7 := mload(0xe0) |
||
| 5230 |
m8 := mload(0x100) |
||
| 5231 |
m9 := mload(0x120) |
||
| 5232 |
m10 := mload(0x140) |
||
| 5233 |
// Selector of `log(address,string,string,string)`. |
||
| 5234 |
mstore(0x00, 0x5d02c50b) |
||
| 5235 |
mstore(0x20, p0) |
||
| 5236 |
mstore(0x40, 0x80) |
||
| 5237 |
mstore(0x60, 0xc0) |
||
| 5238 |
mstore(0x80, 0x100) |
||
| 5239 |
writeString(0xa0, p1) |
||
| 5240 |
writeString(0xe0, p2) |
||
| 5241 |
writeString(0x120, p3) |
||
| 5242 |
} |
||
| 5243 |
_sendLogPayload(0x1c, 0x144); |
||
| 5244 |
assembly {
|
||
| 5245 |
mstore(0x00, m0) |
||
| 5246 |
mstore(0x20, m1) |
||
| 5247 |
mstore(0x40, m2) |
||
| 5248 |
mstore(0x60, m3) |
||
| 5249 |
mstore(0x80, m4) |
||
| 5250 |
mstore(0xa0, m5) |
||
| 5251 |
mstore(0xc0, m6) |
||
| 5252 |
mstore(0xe0, m7) |
||
| 5253 |
mstore(0x100, m8) |
||
| 5254 |
mstore(0x120, m9) |
||
| 5255 |
mstore(0x140, m10) |
||
| 5256 |
} |
||
| 5257 |
} |
||
| 5258 | |||
| 5259 |
function log(bool p0, address p1, address p2, address p3) internal pure {
|
||
| 5260 |
bytes32 m0; |
||
| 5261 |
bytes32 m1; |
||
| 5262 |
bytes32 m2; |
||
| 5263 |
bytes32 m3; |
||
| 5264 |
bytes32 m4; |
||
| 5265 |
assembly {
|
||
| 5266 |
m0 := mload(0x00) |
||
| 5267 |
m1 := mload(0x20) |
||
| 5268 |
m2 := mload(0x40) |
||
| 5269 |
m3 := mload(0x60) |
||
| 5270 |
m4 := mload(0x80) |
||
| 5271 |
// Selector of `log(bool,address,address,address)`. |
||
| 5272 |
mstore(0x00, 0x1d14d001) |
||
| 5273 |
mstore(0x20, p0) |
||
| 5274 |
mstore(0x40, p1) |
||
| 5275 |
mstore(0x60, p2) |
||
| 5276 |
mstore(0x80, p3) |
||
| 5277 |
} |
||
| 5278 |
_sendLogPayload(0x1c, 0x84); |
||
| 5279 |
assembly {
|
||
| 5280 |
mstore(0x00, m0) |
||
| 5281 |
mstore(0x20, m1) |
||
| 5282 |
mstore(0x40, m2) |
||
| 5283 |
mstore(0x60, m3) |
||
| 5284 |
mstore(0x80, m4) |
||
| 5285 |
} |
||
| 5286 |
} |
||
| 5287 | |||
| 5288 |
function log(bool p0, address p1, address p2, bool p3) internal pure {
|
||
| 5289 |
bytes32 m0; |
||
| 5290 |
bytes32 m1; |
||
| 5291 |
bytes32 m2; |
||
| 5292 |
bytes32 m3; |
||
| 5293 |
bytes32 m4; |
||
| 5294 |
assembly {
|
||
| 5295 |
m0 := mload(0x00) |
||
| 5296 |
m1 := mload(0x20) |
||
| 5297 |
m2 := mload(0x40) |
||
| 5298 |
m3 := mload(0x60) |
||
| 5299 |
m4 := mload(0x80) |
||
| 5300 |
// Selector of `log(bool,address,address,bool)`. |
||
| 5301 |
mstore(0x00, 0x46600be0) |
||
| 5302 |
mstore(0x20, p0) |
||
| 5303 |
mstore(0x40, p1) |
||
| 5304 |
mstore(0x60, p2) |
||
| 5305 |
mstore(0x80, p3) |
||
| 5306 |
} |
||
| 5307 |
_sendLogPayload(0x1c, 0x84); |
||
| 5308 |
assembly {
|
||
| 5309 |
mstore(0x00, m0) |
||
| 5310 |
mstore(0x20, m1) |
||
| 5311 |
mstore(0x40, m2) |
||
| 5312 |
mstore(0x60, m3) |
||
| 5313 |
mstore(0x80, m4) |
||
| 5314 |
} |
||
| 5315 |
} |
||
| 5316 | |||
| 5317 |
function log(bool p0, address p1, address p2, uint256 p3) internal pure {
|
||
| 5318 |
bytes32 m0; |
||
| 5319 |
bytes32 m1; |
||
| 5320 |
bytes32 m2; |
||
| 5321 |
bytes32 m3; |
||
| 5322 |
bytes32 m4; |
||
| 5323 |
assembly {
|
||
| 5324 |
m0 := mload(0x00) |
||
| 5325 |
m1 := mload(0x20) |
||
| 5326 |
m2 := mload(0x40) |
||
| 5327 |
m3 := mload(0x60) |
||
| 5328 |
m4 := mload(0x80) |
||
| 5329 |
// Selector of `log(bool,address,address,uint256)`. |
||
| 5330 |
mstore(0x00, 0x0c66d1be) |
||
| 5331 |
mstore(0x20, p0) |
||
| 5332 |
mstore(0x40, p1) |
||
| 5333 |
mstore(0x60, p2) |
||
| 5334 |
mstore(0x80, p3) |
||
| 5335 |
} |
||
| 5336 |
_sendLogPayload(0x1c, 0x84); |
||
| 5337 |
assembly {
|
||
| 5338 |
mstore(0x00, m0) |
||
| 5339 |
mstore(0x20, m1) |
||
| 5340 |
mstore(0x40, m2) |
||
| 5341 |
mstore(0x60, m3) |
||
| 5342 |
mstore(0x80, m4) |
||
| 5343 |
} |
||
| 5344 |
} |
||
| 5345 | |||
| 5346 |
function log(bool p0, address p1, address p2, bytes32 p3) internal pure {
|
||
| 5347 |
bytes32 m0; |
||
| 5348 |
bytes32 m1; |
||
| 5349 |
bytes32 m2; |
||
| 5350 |
bytes32 m3; |
||
| 5351 |
bytes32 m4; |
||
| 5352 |
bytes32 m5; |
||
| 5353 |
bytes32 m6; |
||
| 5354 |
assembly {
|
||
| 5355 |
function writeString(pos, w) {
|
||
| 5356 |
let length := 0 |
||
| 5357 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5358 |
mstore(pos, length) |
||
| 5359 |
let shift := sub(256, shl(3, length)) |
||
| 5360 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5361 |
} |
||
| 5362 |
m0 := mload(0x00) |
||
| 5363 |
m1 := mload(0x20) |
||
| 5364 |
m2 := mload(0x40) |
||
| 5365 |
m3 := mload(0x60) |
||
| 5366 |
m4 := mload(0x80) |
||
| 5367 |
m5 := mload(0xa0) |
||
| 5368 |
m6 := mload(0xc0) |
||
| 5369 |
// Selector of `log(bool,address,address,string)`. |
||
| 5370 |
mstore(0x00, 0xd812a167) |
||
| 5371 |
mstore(0x20, p0) |
||
| 5372 |
mstore(0x40, p1) |
||
| 5373 |
mstore(0x60, p2) |
||
| 5374 |
mstore(0x80, 0x80) |
||
| 5375 |
writeString(0xa0, p3) |
||
| 5376 |
} |
||
| 5377 |
_sendLogPayload(0x1c, 0xc4); |
||
| 5378 |
assembly {
|
||
| 5379 |
mstore(0x00, m0) |
||
| 5380 |
mstore(0x20, m1) |
||
| 5381 |
mstore(0x40, m2) |
||
| 5382 |
mstore(0x60, m3) |
||
| 5383 |
mstore(0x80, m4) |
||
| 5384 |
mstore(0xa0, m5) |
||
| 5385 |
mstore(0xc0, m6) |
||
| 5386 |
} |
||
| 5387 |
} |
||
| 5388 | |||
| 5389 |
function log(bool p0, address p1, bool p2, address p3) internal pure {
|
||
| 5390 |
bytes32 m0; |
||
| 5391 |
bytes32 m1; |
||
| 5392 |
bytes32 m2; |
||
| 5393 |
bytes32 m3; |
||
| 5394 |
bytes32 m4; |
||
| 5395 |
assembly {
|
||
| 5396 |
m0 := mload(0x00) |
||
| 5397 |
m1 := mload(0x20) |
||
| 5398 |
m2 := mload(0x40) |
||
| 5399 |
m3 := mload(0x60) |
||
| 5400 |
m4 := mload(0x80) |
||
| 5401 |
// Selector of `log(bool,address,bool,address)`. |
||
| 5402 |
mstore(0x00, 0x1c41a336) |
||
| 5403 |
mstore(0x20, p0) |
||
| 5404 |
mstore(0x40, p1) |
||
| 5405 |
mstore(0x60, p2) |
||
| 5406 |
mstore(0x80, p3) |
||
| 5407 |
} |
||
| 5408 |
_sendLogPayload(0x1c, 0x84); |
||
| 5409 |
assembly {
|
||
| 5410 |
mstore(0x00, m0) |
||
| 5411 |
mstore(0x20, m1) |
||
| 5412 |
mstore(0x40, m2) |
||
| 5413 |
mstore(0x60, m3) |
||
| 5414 |
mstore(0x80, m4) |
||
| 5415 |
} |
||
| 5416 |
} |
||
| 5417 | |||
| 5418 |
function log(bool p0, address p1, bool p2, bool p3) internal pure {
|
||
| 5419 |
bytes32 m0; |
||
| 5420 |
bytes32 m1; |
||
| 5421 |
bytes32 m2; |
||
| 5422 |
bytes32 m3; |
||
| 5423 |
bytes32 m4; |
||
| 5424 |
assembly {
|
||
| 5425 |
m0 := mload(0x00) |
||
| 5426 |
m1 := mload(0x20) |
||
| 5427 |
m2 := mload(0x40) |
||
| 5428 |
m3 := mload(0x60) |
||
| 5429 |
m4 := mload(0x80) |
||
| 5430 |
// Selector of `log(bool,address,bool,bool)`. |
||
| 5431 |
mstore(0x00, 0x6a9c478b) |
||
| 5432 |
mstore(0x20, p0) |
||
| 5433 |
mstore(0x40, p1) |
||
| 5434 |
mstore(0x60, p2) |
||
| 5435 |
mstore(0x80, p3) |
||
| 5436 |
} |
||
| 5437 |
_sendLogPayload(0x1c, 0x84); |
||
| 5438 |
assembly {
|
||
| 5439 |
mstore(0x00, m0) |
||
| 5440 |
mstore(0x20, m1) |
||
| 5441 |
mstore(0x40, m2) |
||
| 5442 |
mstore(0x60, m3) |
||
| 5443 |
mstore(0x80, m4) |
||
| 5444 |
} |
||
| 5445 |
} |
||
| 5446 | |||
| 5447 |
function log(bool p0, address p1, bool p2, uint256 p3) internal pure {
|
||
| 5448 |
bytes32 m0; |
||
| 5449 |
bytes32 m1; |
||
| 5450 |
bytes32 m2; |
||
| 5451 |
bytes32 m3; |
||
| 5452 |
bytes32 m4; |
||
| 5453 |
assembly {
|
||
| 5454 |
m0 := mload(0x00) |
||
| 5455 |
m1 := mload(0x20) |
||
| 5456 |
m2 := mload(0x40) |
||
| 5457 |
m3 := mload(0x60) |
||
| 5458 |
m4 := mload(0x80) |
||
| 5459 |
// Selector of `log(bool,address,bool,uint256)`. |
||
| 5460 |
mstore(0x00, 0x07831502) |
||
| 5461 |
mstore(0x20, p0) |
||
| 5462 |
mstore(0x40, p1) |
||
| 5463 |
mstore(0x60, p2) |
||
| 5464 |
mstore(0x80, p3) |
||
| 5465 |
} |
||
| 5466 |
_sendLogPayload(0x1c, 0x84); |
||
| 5467 |
assembly {
|
||
| 5468 |
mstore(0x00, m0) |
||
| 5469 |
mstore(0x20, m1) |
||
| 5470 |
mstore(0x40, m2) |
||
| 5471 |
mstore(0x60, m3) |
||
| 5472 |
mstore(0x80, m4) |
||
| 5473 |
} |
||
| 5474 |
} |
||
| 5475 | |||
| 5476 |
function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {
|
||
| 5477 |
bytes32 m0; |
||
| 5478 |
bytes32 m1; |
||
| 5479 |
bytes32 m2; |
||
| 5480 |
bytes32 m3; |
||
| 5481 |
bytes32 m4; |
||
| 5482 |
bytes32 m5; |
||
| 5483 |
bytes32 m6; |
||
| 5484 |
assembly {
|
||
| 5485 |
function writeString(pos, w) {
|
||
| 5486 |
let length := 0 |
||
| 5487 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5488 |
mstore(pos, length) |
||
| 5489 |
let shift := sub(256, shl(3, length)) |
||
| 5490 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5491 |
} |
||
| 5492 |
m0 := mload(0x00) |
||
| 5493 |
m1 := mload(0x20) |
||
| 5494 |
m2 := mload(0x40) |
||
| 5495 |
m3 := mload(0x60) |
||
| 5496 |
m4 := mload(0x80) |
||
| 5497 |
m5 := mload(0xa0) |
||
| 5498 |
m6 := mload(0xc0) |
||
| 5499 |
// Selector of `log(bool,address,bool,string)`. |
||
| 5500 |
mstore(0x00, 0x4a66cb34) |
||
| 5501 |
mstore(0x20, p0) |
||
| 5502 |
mstore(0x40, p1) |
||
| 5503 |
mstore(0x60, p2) |
||
| 5504 |
mstore(0x80, 0x80) |
||
| 5505 |
writeString(0xa0, p3) |
||
| 5506 |
} |
||
| 5507 |
_sendLogPayload(0x1c, 0xc4); |
||
| 5508 |
assembly {
|
||
| 5509 |
mstore(0x00, m0) |
||
| 5510 |
mstore(0x20, m1) |
||
| 5511 |
mstore(0x40, m2) |
||
| 5512 |
mstore(0x60, m3) |
||
| 5513 |
mstore(0x80, m4) |
||
| 5514 |
mstore(0xa0, m5) |
||
| 5515 |
mstore(0xc0, m6) |
||
| 5516 |
} |
||
| 5517 |
} |
||
| 5518 | |||
| 5519 |
function log(bool p0, address p1, uint256 p2, address p3) internal pure {
|
||
| 5520 |
bytes32 m0; |
||
| 5521 |
bytes32 m1; |
||
| 5522 |
bytes32 m2; |
||
| 5523 |
bytes32 m3; |
||
| 5524 |
bytes32 m4; |
||
| 5525 |
assembly {
|
||
| 5526 |
m0 := mload(0x00) |
||
| 5527 |
m1 := mload(0x20) |
||
| 5528 |
m2 := mload(0x40) |
||
| 5529 |
m3 := mload(0x60) |
||
| 5530 |
m4 := mload(0x80) |
||
| 5531 |
// Selector of `log(bool,address,uint256,address)`. |
||
| 5532 |
mstore(0x00, 0x136b05dd) |
||
| 5533 |
mstore(0x20, p0) |
||
| 5534 |
mstore(0x40, p1) |
||
| 5535 |
mstore(0x60, p2) |
||
| 5536 |
mstore(0x80, p3) |
||
| 5537 |
} |
||
| 5538 |
_sendLogPayload(0x1c, 0x84); |
||
| 5539 |
assembly {
|
||
| 5540 |
mstore(0x00, m0) |
||
| 5541 |
mstore(0x20, m1) |
||
| 5542 |
mstore(0x40, m2) |
||
| 5543 |
mstore(0x60, m3) |
||
| 5544 |
mstore(0x80, m4) |
||
| 5545 |
} |
||
| 5546 |
} |
||
| 5547 | |||
| 5548 |
function log(bool p0, address p1, uint256 p2, bool p3) internal pure {
|
||
| 5549 |
bytes32 m0; |
||
| 5550 |
bytes32 m1; |
||
| 5551 |
bytes32 m2; |
||
| 5552 |
bytes32 m3; |
||
| 5553 |
bytes32 m4; |
||
| 5554 |
assembly {
|
||
| 5555 |
m0 := mload(0x00) |
||
| 5556 |
m1 := mload(0x20) |
||
| 5557 |
m2 := mload(0x40) |
||
| 5558 |
m3 := mload(0x60) |
||
| 5559 |
m4 := mload(0x80) |
||
| 5560 |
// Selector of `log(bool,address,uint256,bool)`. |
||
| 5561 |
mstore(0x00, 0xd6019f1c) |
||
| 5562 |
mstore(0x20, p0) |
||
| 5563 |
mstore(0x40, p1) |
||
| 5564 |
mstore(0x60, p2) |
||
| 5565 |
mstore(0x80, p3) |
||
| 5566 |
} |
||
| 5567 |
_sendLogPayload(0x1c, 0x84); |
||
| 5568 |
assembly {
|
||
| 5569 |
mstore(0x00, m0) |
||
| 5570 |
mstore(0x20, m1) |
||
| 5571 |
mstore(0x40, m2) |
||
| 5572 |
mstore(0x60, m3) |
||
| 5573 |
mstore(0x80, m4) |
||
| 5574 |
} |
||
| 5575 |
} |
||
| 5576 | |||
| 5577 |
function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {
|
||
| 5578 |
bytes32 m0; |
||
| 5579 |
bytes32 m1; |
||
| 5580 |
bytes32 m2; |
||
| 5581 |
bytes32 m3; |
||
| 5582 |
bytes32 m4; |
||
| 5583 |
assembly {
|
||
| 5584 |
m0 := mload(0x00) |
||
| 5585 |
m1 := mload(0x20) |
||
| 5586 |
m2 := mload(0x40) |
||
| 5587 |
m3 := mload(0x60) |
||
| 5588 |
m4 := mload(0x80) |
||
| 5589 |
// Selector of `log(bool,address,uint256,uint256)`. |
||
| 5590 |
mstore(0x00, 0x7bf181a1) |
||
| 5591 |
mstore(0x20, p0) |
||
| 5592 |
mstore(0x40, p1) |
||
| 5593 |
mstore(0x60, p2) |
||
| 5594 |
mstore(0x80, p3) |
||
| 5595 |
} |
||
| 5596 |
_sendLogPayload(0x1c, 0x84); |
||
| 5597 |
assembly {
|
||
| 5598 |
mstore(0x00, m0) |
||
| 5599 |
mstore(0x20, m1) |
||
| 5600 |
mstore(0x40, m2) |
||
| 5601 |
mstore(0x60, m3) |
||
| 5602 |
mstore(0x80, m4) |
||
| 5603 |
} |
||
| 5604 |
} |
||
| 5605 | |||
| 5606 |
function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 5607 |
bytes32 m0; |
||
| 5608 |
bytes32 m1; |
||
| 5609 |
bytes32 m2; |
||
| 5610 |
bytes32 m3; |
||
| 5611 |
bytes32 m4; |
||
| 5612 |
bytes32 m5; |
||
| 5613 |
bytes32 m6; |
||
| 5614 |
assembly {
|
||
| 5615 |
function writeString(pos, w) {
|
||
| 5616 |
let length := 0 |
||
| 5617 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5618 |
mstore(pos, length) |
||
| 5619 |
let shift := sub(256, shl(3, length)) |
||
| 5620 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5621 |
} |
||
| 5622 |
m0 := mload(0x00) |
||
| 5623 |
m1 := mload(0x20) |
||
| 5624 |
m2 := mload(0x40) |
||
| 5625 |
m3 := mload(0x60) |
||
| 5626 |
m4 := mload(0x80) |
||
| 5627 |
m5 := mload(0xa0) |
||
| 5628 |
m6 := mload(0xc0) |
||
| 5629 |
// Selector of `log(bool,address,uint256,string)`. |
||
| 5630 |
mstore(0x00, 0x51f09ff8) |
||
| 5631 |
mstore(0x20, p0) |
||
| 5632 |
mstore(0x40, p1) |
||
| 5633 |
mstore(0x60, p2) |
||
| 5634 |
mstore(0x80, 0x80) |
||
| 5635 |
writeString(0xa0, p3) |
||
| 5636 |
} |
||
| 5637 |
_sendLogPayload(0x1c, 0xc4); |
||
| 5638 |
assembly {
|
||
| 5639 |
mstore(0x00, m0) |
||
| 5640 |
mstore(0x20, m1) |
||
| 5641 |
mstore(0x40, m2) |
||
| 5642 |
mstore(0x60, m3) |
||
| 5643 |
mstore(0x80, m4) |
||
| 5644 |
mstore(0xa0, m5) |
||
| 5645 |
mstore(0xc0, m6) |
||
| 5646 |
} |
||
| 5647 |
} |
||
| 5648 | |||
| 5649 |
function log(bool p0, address p1, bytes32 p2, address p3) internal pure {
|
||
| 5650 |
bytes32 m0; |
||
| 5651 |
bytes32 m1; |
||
| 5652 |
bytes32 m2; |
||
| 5653 |
bytes32 m3; |
||
| 5654 |
bytes32 m4; |
||
| 5655 |
bytes32 m5; |
||
| 5656 |
bytes32 m6; |
||
| 5657 |
assembly {
|
||
| 5658 |
function writeString(pos, w) {
|
||
| 5659 |
let length := 0 |
||
| 5660 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5661 |
mstore(pos, length) |
||
| 5662 |
let shift := sub(256, shl(3, length)) |
||
| 5663 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5664 |
} |
||
| 5665 |
m0 := mload(0x00) |
||
| 5666 |
m1 := mload(0x20) |
||
| 5667 |
m2 := mload(0x40) |
||
| 5668 |
m3 := mload(0x60) |
||
| 5669 |
m4 := mload(0x80) |
||
| 5670 |
m5 := mload(0xa0) |
||
| 5671 |
m6 := mload(0xc0) |
||
| 5672 |
// Selector of `log(bool,address,string,address)`. |
||
| 5673 |
mstore(0x00, 0x6f7c603e) |
||
| 5674 |
mstore(0x20, p0) |
||
| 5675 |
mstore(0x40, p1) |
||
| 5676 |
mstore(0x60, 0x80) |
||
| 5677 |
mstore(0x80, p3) |
||
| 5678 |
writeString(0xa0, p2) |
||
| 5679 |
} |
||
| 5680 |
_sendLogPayload(0x1c, 0xc4); |
||
| 5681 |
assembly {
|
||
| 5682 |
mstore(0x00, m0) |
||
| 5683 |
mstore(0x20, m1) |
||
| 5684 |
mstore(0x40, m2) |
||
| 5685 |
mstore(0x60, m3) |
||
| 5686 |
mstore(0x80, m4) |
||
| 5687 |
mstore(0xa0, m5) |
||
| 5688 |
mstore(0xc0, m6) |
||
| 5689 |
} |
||
| 5690 |
} |
||
| 5691 | |||
| 5692 |
function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {
|
||
| 5693 |
bytes32 m0; |
||
| 5694 |
bytes32 m1; |
||
| 5695 |
bytes32 m2; |
||
| 5696 |
bytes32 m3; |
||
| 5697 |
bytes32 m4; |
||
| 5698 |
bytes32 m5; |
||
| 5699 |
bytes32 m6; |
||
| 5700 |
assembly {
|
||
| 5701 |
function writeString(pos, w) {
|
||
| 5702 |
let length := 0 |
||
| 5703 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5704 |
mstore(pos, length) |
||
| 5705 |
let shift := sub(256, shl(3, length)) |
||
| 5706 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5707 |
} |
||
| 5708 |
m0 := mload(0x00) |
||
| 5709 |
m1 := mload(0x20) |
||
| 5710 |
m2 := mload(0x40) |
||
| 5711 |
m3 := mload(0x60) |
||
| 5712 |
m4 := mload(0x80) |
||
| 5713 |
m5 := mload(0xa0) |
||
| 5714 |
m6 := mload(0xc0) |
||
| 5715 |
// Selector of `log(bool,address,string,bool)`. |
||
| 5716 |
mstore(0x00, 0xe2bfd60b) |
||
| 5717 |
mstore(0x20, p0) |
||
| 5718 |
mstore(0x40, p1) |
||
| 5719 |
mstore(0x60, 0x80) |
||
| 5720 |
mstore(0x80, p3) |
||
| 5721 |
writeString(0xa0, p2) |
||
| 5722 |
} |
||
| 5723 |
_sendLogPayload(0x1c, 0xc4); |
||
| 5724 |
assembly {
|
||
| 5725 |
mstore(0x00, m0) |
||
| 5726 |
mstore(0x20, m1) |
||
| 5727 |
mstore(0x40, m2) |
||
| 5728 |
mstore(0x60, m3) |
||
| 5729 |
mstore(0x80, m4) |
||
| 5730 |
mstore(0xa0, m5) |
||
| 5731 |
mstore(0xc0, m6) |
||
| 5732 |
} |
||
| 5733 |
} |
||
| 5734 | |||
| 5735 |
function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 5736 |
bytes32 m0; |
||
| 5737 |
bytes32 m1; |
||
| 5738 |
bytes32 m2; |
||
| 5739 |
bytes32 m3; |
||
| 5740 |
bytes32 m4; |
||
| 5741 |
bytes32 m5; |
||
| 5742 |
bytes32 m6; |
||
| 5743 |
assembly {
|
||
| 5744 |
function writeString(pos, w) {
|
||
| 5745 |
let length := 0 |
||
| 5746 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5747 |
mstore(pos, length) |
||
| 5748 |
let shift := sub(256, shl(3, length)) |
||
| 5749 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5750 |
} |
||
| 5751 |
m0 := mload(0x00) |
||
| 5752 |
m1 := mload(0x20) |
||
| 5753 |
m2 := mload(0x40) |
||
| 5754 |
m3 := mload(0x60) |
||
| 5755 |
m4 := mload(0x80) |
||
| 5756 |
m5 := mload(0xa0) |
||
| 5757 |
m6 := mload(0xc0) |
||
| 5758 |
// Selector of `log(bool,address,string,uint256)`. |
||
| 5759 |
mstore(0x00, 0xc21f64c7) |
||
| 5760 |
mstore(0x20, p0) |
||
| 5761 |
mstore(0x40, p1) |
||
| 5762 |
mstore(0x60, 0x80) |
||
| 5763 |
mstore(0x80, p3) |
||
| 5764 |
writeString(0xa0, p2) |
||
| 5765 |
} |
||
| 5766 |
_sendLogPayload(0x1c, 0xc4); |
||
| 5767 |
assembly {
|
||
| 5768 |
mstore(0x00, m0) |
||
| 5769 |
mstore(0x20, m1) |
||
| 5770 |
mstore(0x40, m2) |
||
| 5771 |
mstore(0x60, m3) |
||
| 5772 |
mstore(0x80, m4) |
||
| 5773 |
mstore(0xa0, m5) |
||
| 5774 |
mstore(0xc0, m6) |
||
| 5775 |
} |
||
| 5776 |
} |
||
| 5777 | |||
| 5778 |
function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 5779 |
bytes32 m0; |
||
| 5780 |
bytes32 m1; |
||
| 5781 |
bytes32 m2; |
||
| 5782 |
bytes32 m3; |
||
| 5783 |
bytes32 m4; |
||
| 5784 |
bytes32 m5; |
||
| 5785 |
bytes32 m6; |
||
| 5786 |
bytes32 m7; |
||
| 5787 |
bytes32 m8; |
||
| 5788 |
assembly {
|
||
| 5789 |
function writeString(pos, w) {
|
||
| 5790 |
let length := 0 |
||
| 5791 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5792 |
mstore(pos, length) |
||
| 5793 |
let shift := sub(256, shl(3, length)) |
||
| 5794 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5795 |
} |
||
| 5796 |
m0 := mload(0x00) |
||
| 5797 |
m1 := mload(0x20) |
||
| 5798 |
m2 := mload(0x40) |
||
| 5799 |
m3 := mload(0x60) |
||
| 5800 |
m4 := mload(0x80) |
||
| 5801 |
m5 := mload(0xa0) |
||
| 5802 |
m6 := mload(0xc0) |
||
| 5803 |
m7 := mload(0xe0) |
||
| 5804 |
m8 := mload(0x100) |
||
| 5805 |
// Selector of `log(bool,address,string,string)`. |
||
| 5806 |
mstore(0x00, 0xa73c1db6) |
||
| 5807 |
mstore(0x20, p0) |
||
| 5808 |
mstore(0x40, p1) |
||
| 5809 |
mstore(0x60, 0x80) |
||
| 5810 |
mstore(0x80, 0xc0) |
||
| 5811 |
writeString(0xa0, p2) |
||
| 5812 |
writeString(0xe0, p3) |
||
| 5813 |
} |
||
| 5814 |
_sendLogPayload(0x1c, 0x104); |
||
| 5815 |
assembly {
|
||
| 5816 |
mstore(0x00, m0) |
||
| 5817 |
mstore(0x20, m1) |
||
| 5818 |
mstore(0x40, m2) |
||
| 5819 |
mstore(0x60, m3) |
||
| 5820 |
mstore(0x80, m4) |
||
| 5821 |
mstore(0xa0, m5) |
||
| 5822 |
mstore(0xc0, m6) |
||
| 5823 |
mstore(0xe0, m7) |
||
| 5824 |
mstore(0x100, m8) |
||
| 5825 |
} |
||
| 5826 |
} |
||
| 5827 | |||
| 5828 |
function log(bool p0, bool p1, address p2, address p3) internal pure {
|
||
| 5829 |
bytes32 m0; |
||
| 5830 |
bytes32 m1; |
||
| 5831 |
bytes32 m2; |
||
| 5832 |
bytes32 m3; |
||
| 5833 |
bytes32 m4; |
||
| 5834 |
assembly {
|
||
| 5835 |
m0 := mload(0x00) |
||
| 5836 |
m1 := mload(0x20) |
||
| 5837 |
m2 := mload(0x40) |
||
| 5838 |
m3 := mload(0x60) |
||
| 5839 |
m4 := mload(0x80) |
||
| 5840 |
// Selector of `log(bool,bool,address,address)`. |
||
| 5841 |
mstore(0x00, 0xf4880ea4) |
||
| 5842 |
mstore(0x20, p0) |
||
| 5843 |
mstore(0x40, p1) |
||
| 5844 |
mstore(0x60, p2) |
||
| 5845 |
mstore(0x80, p3) |
||
| 5846 |
} |
||
| 5847 |
_sendLogPayload(0x1c, 0x84); |
||
| 5848 |
assembly {
|
||
| 5849 |
mstore(0x00, m0) |
||
| 5850 |
mstore(0x20, m1) |
||
| 5851 |
mstore(0x40, m2) |
||
| 5852 |
mstore(0x60, m3) |
||
| 5853 |
mstore(0x80, m4) |
||
| 5854 |
} |
||
| 5855 |
} |
||
| 5856 | |||
| 5857 |
function log(bool p0, bool p1, address p2, bool p3) internal pure {
|
||
| 5858 |
bytes32 m0; |
||
| 5859 |
bytes32 m1; |
||
| 5860 |
bytes32 m2; |
||
| 5861 |
bytes32 m3; |
||
| 5862 |
bytes32 m4; |
||
| 5863 |
assembly {
|
||
| 5864 |
m0 := mload(0x00) |
||
| 5865 |
m1 := mload(0x20) |
||
| 5866 |
m2 := mload(0x40) |
||
| 5867 |
m3 := mload(0x60) |
||
| 5868 |
m4 := mload(0x80) |
||
| 5869 |
// Selector of `log(bool,bool,address,bool)`. |
||
| 5870 |
mstore(0x00, 0xc0a302d8) |
||
| 5871 |
mstore(0x20, p0) |
||
| 5872 |
mstore(0x40, p1) |
||
| 5873 |
mstore(0x60, p2) |
||
| 5874 |
mstore(0x80, p3) |
||
| 5875 |
} |
||
| 5876 |
_sendLogPayload(0x1c, 0x84); |
||
| 5877 |
assembly {
|
||
| 5878 |
mstore(0x00, m0) |
||
| 5879 |
mstore(0x20, m1) |
||
| 5880 |
mstore(0x40, m2) |
||
| 5881 |
mstore(0x60, m3) |
||
| 5882 |
mstore(0x80, m4) |
||
| 5883 |
} |
||
| 5884 |
} |
||
| 5885 | |||
| 5886 |
function log(bool p0, bool p1, address p2, uint256 p3) internal pure {
|
||
| 5887 |
bytes32 m0; |
||
| 5888 |
bytes32 m1; |
||
| 5889 |
bytes32 m2; |
||
| 5890 |
bytes32 m3; |
||
| 5891 |
bytes32 m4; |
||
| 5892 |
assembly {
|
||
| 5893 |
m0 := mload(0x00) |
||
| 5894 |
m1 := mload(0x20) |
||
| 5895 |
m2 := mload(0x40) |
||
| 5896 |
m3 := mload(0x60) |
||
| 5897 |
m4 := mload(0x80) |
||
| 5898 |
// Selector of `log(bool,bool,address,uint256)`. |
||
| 5899 |
mstore(0x00, 0x4c123d57) |
||
| 5900 |
mstore(0x20, p0) |
||
| 5901 |
mstore(0x40, p1) |
||
| 5902 |
mstore(0x60, p2) |
||
| 5903 |
mstore(0x80, p3) |
||
| 5904 |
} |
||
| 5905 |
_sendLogPayload(0x1c, 0x84); |
||
| 5906 |
assembly {
|
||
| 5907 |
mstore(0x00, m0) |
||
| 5908 |
mstore(0x20, m1) |
||
| 5909 |
mstore(0x40, m2) |
||
| 5910 |
mstore(0x60, m3) |
||
| 5911 |
mstore(0x80, m4) |
||
| 5912 |
} |
||
| 5913 |
} |
||
| 5914 | |||
| 5915 |
function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {
|
||
| 5916 |
bytes32 m0; |
||
| 5917 |
bytes32 m1; |
||
| 5918 |
bytes32 m2; |
||
| 5919 |
bytes32 m3; |
||
| 5920 |
bytes32 m4; |
||
| 5921 |
bytes32 m5; |
||
| 5922 |
bytes32 m6; |
||
| 5923 |
assembly {
|
||
| 5924 |
function writeString(pos, w) {
|
||
| 5925 |
let length := 0 |
||
| 5926 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 5927 |
mstore(pos, length) |
||
| 5928 |
let shift := sub(256, shl(3, length)) |
||
| 5929 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 5930 |
} |
||
| 5931 |
m0 := mload(0x00) |
||
| 5932 |
m1 := mload(0x20) |
||
| 5933 |
m2 := mload(0x40) |
||
| 5934 |
m3 := mload(0x60) |
||
| 5935 |
m4 := mload(0x80) |
||
| 5936 |
m5 := mload(0xa0) |
||
| 5937 |
m6 := mload(0xc0) |
||
| 5938 |
// Selector of `log(bool,bool,address,string)`. |
||
| 5939 |
mstore(0x00, 0xa0a47963) |
||
| 5940 |
mstore(0x20, p0) |
||
| 5941 |
mstore(0x40, p1) |
||
| 5942 |
mstore(0x60, p2) |
||
| 5943 |
mstore(0x80, 0x80) |
||
| 5944 |
writeString(0xa0, p3) |
||
| 5945 |
} |
||
| 5946 |
_sendLogPayload(0x1c, 0xc4); |
||
| 5947 |
assembly {
|
||
| 5948 |
mstore(0x00, m0) |
||
| 5949 |
mstore(0x20, m1) |
||
| 5950 |
mstore(0x40, m2) |
||
| 5951 |
mstore(0x60, m3) |
||
| 5952 |
mstore(0x80, m4) |
||
| 5953 |
mstore(0xa0, m5) |
||
| 5954 |
mstore(0xc0, m6) |
||
| 5955 |
} |
||
| 5956 |
} |
||
| 5957 | |||
| 5958 |
function log(bool p0, bool p1, bool p2, address p3) internal pure {
|
||
| 5959 |
bytes32 m0; |
||
| 5960 |
bytes32 m1; |
||
| 5961 |
bytes32 m2; |
||
| 5962 |
bytes32 m3; |
||
| 5963 |
bytes32 m4; |
||
| 5964 |
assembly {
|
||
| 5965 |
m0 := mload(0x00) |
||
| 5966 |
m1 := mload(0x20) |
||
| 5967 |
m2 := mload(0x40) |
||
| 5968 |
m3 := mload(0x60) |
||
| 5969 |
m4 := mload(0x80) |
||
| 5970 |
// Selector of `log(bool,bool,bool,address)`. |
||
| 5971 |
mstore(0x00, 0x8c329b1a) |
||
| 5972 |
mstore(0x20, p0) |
||
| 5973 |
mstore(0x40, p1) |
||
| 5974 |
mstore(0x60, p2) |
||
| 5975 |
mstore(0x80, p3) |
||
| 5976 |
} |
||
| 5977 |
_sendLogPayload(0x1c, 0x84); |
||
| 5978 |
assembly {
|
||
| 5979 |
mstore(0x00, m0) |
||
| 5980 |
mstore(0x20, m1) |
||
| 5981 |
mstore(0x40, m2) |
||
| 5982 |
mstore(0x60, m3) |
||
| 5983 |
mstore(0x80, m4) |
||
| 5984 |
} |
||
| 5985 |
} |
||
| 5986 | |||
| 5987 |
function log(bool p0, bool p1, bool p2, bool p3) internal pure {
|
||
| 5988 |
bytes32 m0; |
||
| 5989 |
bytes32 m1; |
||
| 5990 |
bytes32 m2; |
||
| 5991 |
bytes32 m3; |
||
| 5992 |
bytes32 m4; |
||
| 5993 |
assembly {
|
||
| 5994 |
m0 := mload(0x00) |
||
| 5995 |
m1 := mload(0x20) |
||
| 5996 |
m2 := mload(0x40) |
||
| 5997 |
m3 := mload(0x60) |
||
| 5998 |
m4 := mload(0x80) |
||
| 5999 |
// Selector of `log(bool,bool,bool,bool)`. |
||
| 6000 |
mstore(0x00, 0x3b2a5ce0) |
||
| 6001 |
mstore(0x20, p0) |
||
| 6002 |
mstore(0x40, p1) |
||
| 6003 |
mstore(0x60, p2) |
||
| 6004 |
mstore(0x80, p3) |
||
| 6005 |
} |
||
| 6006 |
_sendLogPayload(0x1c, 0x84); |
||
| 6007 |
assembly {
|
||
| 6008 |
mstore(0x00, m0) |
||
| 6009 |
mstore(0x20, m1) |
||
| 6010 |
mstore(0x40, m2) |
||
| 6011 |
mstore(0x60, m3) |
||
| 6012 |
mstore(0x80, m4) |
||
| 6013 |
} |
||
| 6014 |
} |
||
| 6015 | |||
| 6016 |
function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {
|
||
| 6017 |
bytes32 m0; |
||
| 6018 |
bytes32 m1; |
||
| 6019 |
bytes32 m2; |
||
| 6020 |
bytes32 m3; |
||
| 6021 |
bytes32 m4; |
||
| 6022 |
assembly {
|
||
| 6023 |
m0 := mload(0x00) |
||
| 6024 |
m1 := mload(0x20) |
||
| 6025 |
m2 := mload(0x40) |
||
| 6026 |
m3 := mload(0x60) |
||
| 6027 |
m4 := mload(0x80) |
||
| 6028 |
// Selector of `log(bool,bool,bool,uint256)`. |
||
| 6029 |
mstore(0x00, 0x6d7045c1) |
||
| 6030 |
mstore(0x20, p0) |
||
| 6031 |
mstore(0x40, p1) |
||
| 6032 |
mstore(0x60, p2) |
||
| 6033 |
mstore(0x80, p3) |
||
| 6034 |
} |
||
| 6035 |
_sendLogPayload(0x1c, 0x84); |
||
| 6036 |
assembly {
|
||
| 6037 |
mstore(0x00, m0) |
||
| 6038 |
mstore(0x20, m1) |
||
| 6039 |
mstore(0x40, m2) |
||
| 6040 |
mstore(0x60, m3) |
||
| 6041 |
mstore(0x80, m4) |
||
| 6042 |
} |
||
| 6043 |
} |
||
| 6044 | |||
| 6045 |
function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {
|
||
| 6046 |
bytes32 m0; |
||
| 6047 |
bytes32 m1; |
||
| 6048 |
bytes32 m2; |
||
| 6049 |
bytes32 m3; |
||
| 6050 |
bytes32 m4; |
||
| 6051 |
bytes32 m5; |
||
| 6052 |
bytes32 m6; |
||
| 6053 |
assembly {
|
||
| 6054 |
function writeString(pos, w) {
|
||
| 6055 |
let length := 0 |
||
| 6056 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6057 |
mstore(pos, length) |
||
| 6058 |
let shift := sub(256, shl(3, length)) |
||
| 6059 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6060 |
} |
||
| 6061 |
m0 := mload(0x00) |
||
| 6062 |
m1 := mload(0x20) |
||
| 6063 |
m2 := mload(0x40) |
||
| 6064 |
m3 := mload(0x60) |
||
| 6065 |
m4 := mload(0x80) |
||
| 6066 |
m5 := mload(0xa0) |
||
| 6067 |
m6 := mload(0xc0) |
||
| 6068 |
// Selector of `log(bool,bool,bool,string)`. |
||
| 6069 |
mstore(0x00, 0x2ae408d4) |
||
| 6070 |
mstore(0x20, p0) |
||
| 6071 |
mstore(0x40, p1) |
||
| 6072 |
mstore(0x60, p2) |
||
| 6073 |
mstore(0x80, 0x80) |
||
| 6074 |
writeString(0xa0, p3) |
||
| 6075 |
} |
||
| 6076 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6077 |
assembly {
|
||
| 6078 |
mstore(0x00, m0) |
||
| 6079 |
mstore(0x20, m1) |
||
| 6080 |
mstore(0x40, m2) |
||
| 6081 |
mstore(0x60, m3) |
||
| 6082 |
mstore(0x80, m4) |
||
| 6083 |
mstore(0xa0, m5) |
||
| 6084 |
mstore(0xc0, m6) |
||
| 6085 |
} |
||
| 6086 |
} |
||
| 6087 | |||
| 6088 |
function log(bool p0, bool p1, uint256 p2, address p3) internal pure {
|
||
| 6089 |
bytes32 m0; |
||
| 6090 |
bytes32 m1; |
||
| 6091 |
bytes32 m2; |
||
| 6092 |
bytes32 m3; |
||
| 6093 |
bytes32 m4; |
||
| 6094 |
assembly {
|
||
| 6095 |
m0 := mload(0x00) |
||
| 6096 |
m1 := mload(0x20) |
||
| 6097 |
m2 := mload(0x40) |
||
| 6098 |
m3 := mload(0x60) |
||
| 6099 |
m4 := mload(0x80) |
||
| 6100 |
// Selector of `log(bool,bool,uint256,address)`. |
||
| 6101 |
mstore(0x00, 0x54a7a9a0) |
||
| 6102 |
mstore(0x20, p0) |
||
| 6103 |
mstore(0x40, p1) |
||
| 6104 |
mstore(0x60, p2) |
||
| 6105 |
mstore(0x80, p3) |
||
| 6106 |
} |
||
| 6107 |
_sendLogPayload(0x1c, 0x84); |
||
| 6108 |
assembly {
|
||
| 6109 |
mstore(0x00, m0) |
||
| 6110 |
mstore(0x20, m1) |
||
| 6111 |
mstore(0x40, m2) |
||
| 6112 |
mstore(0x60, m3) |
||
| 6113 |
mstore(0x80, m4) |
||
| 6114 |
} |
||
| 6115 |
} |
||
| 6116 | |||
| 6117 |
function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {
|
||
| 6118 |
bytes32 m0; |
||
| 6119 |
bytes32 m1; |
||
| 6120 |
bytes32 m2; |
||
| 6121 |
bytes32 m3; |
||
| 6122 |
bytes32 m4; |
||
| 6123 |
assembly {
|
||
| 6124 |
m0 := mload(0x00) |
||
| 6125 |
m1 := mload(0x20) |
||
| 6126 |
m2 := mload(0x40) |
||
| 6127 |
m3 := mload(0x60) |
||
| 6128 |
m4 := mload(0x80) |
||
| 6129 |
// Selector of `log(bool,bool,uint256,bool)`. |
||
| 6130 |
mstore(0x00, 0x619e4d0e) |
||
| 6131 |
mstore(0x20, p0) |
||
| 6132 |
mstore(0x40, p1) |
||
| 6133 |
mstore(0x60, p2) |
||
| 6134 |
mstore(0x80, p3) |
||
| 6135 |
} |
||
| 6136 |
_sendLogPayload(0x1c, 0x84); |
||
| 6137 |
assembly {
|
||
| 6138 |
mstore(0x00, m0) |
||
| 6139 |
mstore(0x20, m1) |
||
| 6140 |
mstore(0x40, m2) |
||
| 6141 |
mstore(0x60, m3) |
||
| 6142 |
mstore(0x80, m4) |
||
| 6143 |
} |
||
| 6144 |
} |
||
| 6145 | |||
| 6146 |
function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {
|
||
| 6147 |
bytes32 m0; |
||
| 6148 |
bytes32 m1; |
||
| 6149 |
bytes32 m2; |
||
| 6150 |
bytes32 m3; |
||
| 6151 |
bytes32 m4; |
||
| 6152 |
assembly {
|
||
| 6153 |
m0 := mload(0x00) |
||
| 6154 |
m1 := mload(0x20) |
||
| 6155 |
m2 := mload(0x40) |
||
| 6156 |
m3 := mload(0x60) |
||
| 6157 |
m4 := mload(0x80) |
||
| 6158 |
// Selector of `log(bool,bool,uint256,uint256)`. |
||
| 6159 |
mstore(0x00, 0x0bb00eab) |
||
| 6160 |
mstore(0x20, p0) |
||
| 6161 |
mstore(0x40, p1) |
||
| 6162 |
mstore(0x60, p2) |
||
| 6163 |
mstore(0x80, p3) |
||
| 6164 |
} |
||
| 6165 |
_sendLogPayload(0x1c, 0x84); |
||
| 6166 |
assembly {
|
||
| 6167 |
mstore(0x00, m0) |
||
| 6168 |
mstore(0x20, m1) |
||
| 6169 |
mstore(0x40, m2) |
||
| 6170 |
mstore(0x60, m3) |
||
| 6171 |
mstore(0x80, m4) |
||
| 6172 |
} |
||
| 6173 |
} |
||
| 6174 | |||
| 6175 |
function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 6176 |
bytes32 m0; |
||
| 6177 |
bytes32 m1; |
||
| 6178 |
bytes32 m2; |
||
| 6179 |
bytes32 m3; |
||
| 6180 |
bytes32 m4; |
||
| 6181 |
bytes32 m5; |
||
| 6182 |
bytes32 m6; |
||
| 6183 |
assembly {
|
||
| 6184 |
function writeString(pos, w) {
|
||
| 6185 |
let length := 0 |
||
| 6186 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6187 |
mstore(pos, length) |
||
| 6188 |
let shift := sub(256, shl(3, length)) |
||
| 6189 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6190 |
} |
||
| 6191 |
m0 := mload(0x00) |
||
| 6192 |
m1 := mload(0x20) |
||
| 6193 |
m2 := mload(0x40) |
||
| 6194 |
m3 := mload(0x60) |
||
| 6195 |
m4 := mload(0x80) |
||
| 6196 |
m5 := mload(0xa0) |
||
| 6197 |
m6 := mload(0xc0) |
||
| 6198 |
// Selector of `log(bool,bool,uint256,string)`. |
||
| 6199 |
mstore(0x00, 0x7dd4d0e0) |
||
| 6200 |
mstore(0x20, p0) |
||
| 6201 |
mstore(0x40, p1) |
||
| 6202 |
mstore(0x60, p2) |
||
| 6203 |
mstore(0x80, 0x80) |
||
| 6204 |
writeString(0xa0, p3) |
||
| 6205 |
} |
||
| 6206 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6207 |
assembly {
|
||
| 6208 |
mstore(0x00, m0) |
||
| 6209 |
mstore(0x20, m1) |
||
| 6210 |
mstore(0x40, m2) |
||
| 6211 |
mstore(0x60, m3) |
||
| 6212 |
mstore(0x80, m4) |
||
| 6213 |
mstore(0xa0, m5) |
||
| 6214 |
mstore(0xc0, m6) |
||
| 6215 |
} |
||
| 6216 |
} |
||
| 6217 | |||
| 6218 |
function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {
|
||
| 6219 |
bytes32 m0; |
||
| 6220 |
bytes32 m1; |
||
| 6221 |
bytes32 m2; |
||
| 6222 |
bytes32 m3; |
||
| 6223 |
bytes32 m4; |
||
| 6224 |
bytes32 m5; |
||
| 6225 |
bytes32 m6; |
||
| 6226 |
assembly {
|
||
| 6227 |
function writeString(pos, w) {
|
||
| 6228 |
let length := 0 |
||
| 6229 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6230 |
mstore(pos, length) |
||
| 6231 |
let shift := sub(256, shl(3, length)) |
||
| 6232 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6233 |
} |
||
| 6234 |
m0 := mload(0x00) |
||
| 6235 |
m1 := mload(0x20) |
||
| 6236 |
m2 := mload(0x40) |
||
| 6237 |
m3 := mload(0x60) |
||
| 6238 |
m4 := mload(0x80) |
||
| 6239 |
m5 := mload(0xa0) |
||
| 6240 |
m6 := mload(0xc0) |
||
| 6241 |
// Selector of `log(bool,bool,string,address)`. |
||
| 6242 |
mstore(0x00, 0xf9ad2b89) |
||
| 6243 |
mstore(0x20, p0) |
||
| 6244 |
mstore(0x40, p1) |
||
| 6245 |
mstore(0x60, 0x80) |
||
| 6246 |
mstore(0x80, p3) |
||
| 6247 |
writeString(0xa0, p2) |
||
| 6248 |
} |
||
| 6249 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6250 |
assembly {
|
||
| 6251 |
mstore(0x00, m0) |
||
| 6252 |
mstore(0x20, m1) |
||
| 6253 |
mstore(0x40, m2) |
||
| 6254 |
mstore(0x60, m3) |
||
| 6255 |
mstore(0x80, m4) |
||
| 6256 |
mstore(0xa0, m5) |
||
| 6257 |
mstore(0xc0, m6) |
||
| 6258 |
} |
||
| 6259 |
} |
||
| 6260 | |||
| 6261 |
function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {
|
||
| 6262 |
bytes32 m0; |
||
| 6263 |
bytes32 m1; |
||
| 6264 |
bytes32 m2; |
||
| 6265 |
bytes32 m3; |
||
| 6266 |
bytes32 m4; |
||
| 6267 |
bytes32 m5; |
||
| 6268 |
bytes32 m6; |
||
| 6269 |
assembly {
|
||
| 6270 |
function writeString(pos, w) {
|
||
| 6271 |
let length := 0 |
||
| 6272 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6273 |
mstore(pos, length) |
||
| 6274 |
let shift := sub(256, shl(3, length)) |
||
| 6275 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6276 |
} |
||
| 6277 |
m0 := mload(0x00) |
||
| 6278 |
m1 := mload(0x20) |
||
| 6279 |
m2 := mload(0x40) |
||
| 6280 |
m3 := mload(0x60) |
||
| 6281 |
m4 := mload(0x80) |
||
| 6282 |
m5 := mload(0xa0) |
||
| 6283 |
m6 := mload(0xc0) |
||
| 6284 |
// Selector of `log(bool,bool,string,bool)`. |
||
| 6285 |
mstore(0x00, 0xb857163a) |
||
| 6286 |
mstore(0x20, p0) |
||
| 6287 |
mstore(0x40, p1) |
||
| 6288 |
mstore(0x60, 0x80) |
||
| 6289 |
mstore(0x80, p3) |
||
| 6290 |
writeString(0xa0, p2) |
||
| 6291 |
} |
||
| 6292 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6293 |
assembly {
|
||
| 6294 |
mstore(0x00, m0) |
||
| 6295 |
mstore(0x20, m1) |
||
| 6296 |
mstore(0x40, m2) |
||
| 6297 |
mstore(0x60, m3) |
||
| 6298 |
mstore(0x80, m4) |
||
| 6299 |
mstore(0xa0, m5) |
||
| 6300 |
mstore(0xc0, m6) |
||
| 6301 |
} |
||
| 6302 |
} |
||
| 6303 | |||
| 6304 |
function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 6305 |
bytes32 m0; |
||
| 6306 |
bytes32 m1; |
||
| 6307 |
bytes32 m2; |
||
| 6308 |
bytes32 m3; |
||
| 6309 |
bytes32 m4; |
||
| 6310 |
bytes32 m5; |
||
| 6311 |
bytes32 m6; |
||
| 6312 |
assembly {
|
||
| 6313 |
function writeString(pos, w) {
|
||
| 6314 |
let length := 0 |
||
| 6315 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6316 |
mstore(pos, length) |
||
| 6317 |
let shift := sub(256, shl(3, length)) |
||
| 6318 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6319 |
} |
||
| 6320 |
m0 := mload(0x00) |
||
| 6321 |
m1 := mload(0x20) |
||
| 6322 |
m2 := mload(0x40) |
||
| 6323 |
m3 := mload(0x60) |
||
| 6324 |
m4 := mload(0x80) |
||
| 6325 |
m5 := mload(0xa0) |
||
| 6326 |
m6 := mload(0xc0) |
||
| 6327 |
// Selector of `log(bool,bool,string,uint256)`. |
||
| 6328 |
mstore(0x00, 0xe3a9ca2f) |
||
| 6329 |
mstore(0x20, p0) |
||
| 6330 |
mstore(0x40, p1) |
||
| 6331 |
mstore(0x60, 0x80) |
||
| 6332 |
mstore(0x80, p3) |
||
| 6333 |
writeString(0xa0, p2) |
||
| 6334 |
} |
||
| 6335 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6336 |
assembly {
|
||
| 6337 |
mstore(0x00, m0) |
||
| 6338 |
mstore(0x20, m1) |
||
| 6339 |
mstore(0x40, m2) |
||
| 6340 |
mstore(0x60, m3) |
||
| 6341 |
mstore(0x80, m4) |
||
| 6342 |
mstore(0xa0, m5) |
||
| 6343 |
mstore(0xc0, m6) |
||
| 6344 |
} |
||
| 6345 |
} |
||
| 6346 | |||
| 6347 |
function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 6348 |
bytes32 m0; |
||
| 6349 |
bytes32 m1; |
||
| 6350 |
bytes32 m2; |
||
| 6351 |
bytes32 m3; |
||
| 6352 |
bytes32 m4; |
||
| 6353 |
bytes32 m5; |
||
| 6354 |
bytes32 m6; |
||
| 6355 |
bytes32 m7; |
||
| 6356 |
bytes32 m8; |
||
| 6357 |
assembly {
|
||
| 6358 |
function writeString(pos, w) {
|
||
| 6359 |
let length := 0 |
||
| 6360 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6361 |
mstore(pos, length) |
||
| 6362 |
let shift := sub(256, shl(3, length)) |
||
| 6363 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6364 |
} |
||
| 6365 |
m0 := mload(0x00) |
||
| 6366 |
m1 := mload(0x20) |
||
| 6367 |
m2 := mload(0x40) |
||
| 6368 |
m3 := mload(0x60) |
||
| 6369 |
m4 := mload(0x80) |
||
| 6370 |
m5 := mload(0xa0) |
||
| 6371 |
m6 := mload(0xc0) |
||
| 6372 |
m7 := mload(0xe0) |
||
| 6373 |
m8 := mload(0x100) |
||
| 6374 |
// Selector of `log(bool,bool,string,string)`. |
||
| 6375 |
mstore(0x00, 0x6d1e8751) |
||
| 6376 |
mstore(0x20, p0) |
||
| 6377 |
mstore(0x40, p1) |
||
| 6378 |
mstore(0x60, 0x80) |
||
| 6379 |
mstore(0x80, 0xc0) |
||
| 6380 |
writeString(0xa0, p2) |
||
| 6381 |
writeString(0xe0, p3) |
||
| 6382 |
} |
||
| 6383 |
_sendLogPayload(0x1c, 0x104); |
||
| 6384 |
assembly {
|
||
| 6385 |
mstore(0x00, m0) |
||
| 6386 |
mstore(0x20, m1) |
||
| 6387 |
mstore(0x40, m2) |
||
| 6388 |
mstore(0x60, m3) |
||
| 6389 |
mstore(0x80, m4) |
||
| 6390 |
mstore(0xa0, m5) |
||
| 6391 |
mstore(0xc0, m6) |
||
| 6392 |
mstore(0xe0, m7) |
||
| 6393 |
mstore(0x100, m8) |
||
| 6394 |
} |
||
| 6395 |
} |
||
| 6396 | |||
| 6397 |
function log(bool p0, uint256 p1, address p2, address p3) internal pure {
|
||
| 6398 |
bytes32 m0; |
||
| 6399 |
bytes32 m1; |
||
| 6400 |
bytes32 m2; |
||
| 6401 |
bytes32 m3; |
||
| 6402 |
bytes32 m4; |
||
| 6403 |
assembly {
|
||
| 6404 |
m0 := mload(0x00) |
||
| 6405 |
m1 := mload(0x20) |
||
| 6406 |
m2 := mload(0x40) |
||
| 6407 |
m3 := mload(0x60) |
||
| 6408 |
m4 := mload(0x80) |
||
| 6409 |
// Selector of `log(bool,uint256,address,address)`. |
||
| 6410 |
mstore(0x00, 0x26f560a8) |
||
| 6411 |
mstore(0x20, p0) |
||
| 6412 |
mstore(0x40, p1) |
||
| 6413 |
mstore(0x60, p2) |
||
| 6414 |
mstore(0x80, p3) |
||
| 6415 |
} |
||
| 6416 |
_sendLogPayload(0x1c, 0x84); |
||
| 6417 |
assembly {
|
||
| 6418 |
mstore(0x00, m0) |
||
| 6419 |
mstore(0x20, m1) |
||
| 6420 |
mstore(0x40, m2) |
||
| 6421 |
mstore(0x60, m3) |
||
| 6422 |
mstore(0x80, m4) |
||
| 6423 |
} |
||
| 6424 |
} |
||
| 6425 | |||
| 6426 |
function log(bool p0, uint256 p1, address p2, bool p3) internal pure {
|
||
| 6427 |
bytes32 m0; |
||
| 6428 |
bytes32 m1; |
||
| 6429 |
bytes32 m2; |
||
| 6430 |
bytes32 m3; |
||
| 6431 |
bytes32 m4; |
||
| 6432 |
assembly {
|
||
| 6433 |
m0 := mload(0x00) |
||
| 6434 |
m1 := mload(0x20) |
||
| 6435 |
m2 := mload(0x40) |
||
| 6436 |
m3 := mload(0x60) |
||
| 6437 |
m4 := mload(0x80) |
||
| 6438 |
// Selector of `log(bool,uint256,address,bool)`. |
||
| 6439 |
mstore(0x00, 0xb4c314ff) |
||
| 6440 |
mstore(0x20, p0) |
||
| 6441 |
mstore(0x40, p1) |
||
| 6442 |
mstore(0x60, p2) |
||
| 6443 |
mstore(0x80, p3) |
||
| 6444 |
} |
||
| 6445 |
_sendLogPayload(0x1c, 0x84); |
||
| 6446 |
assembly {
|
||
| 6447 |
mstore(0x00, m0) |
||
| 6448 |
mstore(0x20, m1) |
||
| 6449 |
mstore(0x40, m2) |
||
| 6450 |
mstore(0x60, m3) |
||
| 6451 |
mstore(0x80, m4) |
||
| 6452 |
} |
||
| 6453 |
} |
||
| 6454 | |||
| 6455 |
function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {
|
||
| 6456 |
bytes32 m0; |
||
| 6457 |
bytes32 m1; |
||
| 6458 |
bytes32 m2; |
||
| 6459 |
bytes32 m3; |
||
| 6460 |
bytes32 m4; |
||
| 6461 |
assembly {
|
||
| 6462 |
m0 := mload(0x00) |
||
| 6463 |
m1 := mload(0x20) |
||
| 6464 |
m2 := mload(0x40) |
||
| 6465 |
m3 := mload(0x60) |
||
| 6466 |
m4 := mload(0x80) |
||
| 6467 |
// Selector of `log(bool,uint256,address,uint256)`. |
||
| 6468 |
mstore(0x00, 0x1537dc87) |
||
| 6469 |
mstore(0x20, p0) |
||
| 6470 |
mstore(0x40, p1) |
||
| 6471 |
mstore(0x60, p2) |
||
| 6472 |
mstore(0x80, p3) |
||
| 6473 |
} |
||
| 6474 |
_sendLogPayload(0x1c, 0x84); |
||
| 6475 |
assembly {
|
||
| 6476 |
mstore(0x00, m0) |
||
| 6477 |
mstore(0x20, m1) |
||
| 6478 |
mstore(0x40, m2) |
||
| 6479 |
mstore(0x60, m3) |
||
| 6480 |
mstore(0x80, m4) |
||
| 6481 |
} |
||
| 6482 |
} |
||
| 6483 | |||
| 6484 |
function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {
|
||
| 6485 |
bytes32 m0; |
||
| 6486 |
bytes32 m1; |
||
| 6487 |
bytes32 m2; |
||
| 6488 |
bytes32 m3; |
||
| 6489 |
bytes32 m4; |
||
| 6490 |
bytes32 m5; |
||
| 6491 |
bytes32 m6; |
||
| 6492 |
assembly {
|
||
| 6493 |
function writeString(pos, w) {
|
||
| 6494 |
let length := 0 |
||
| 6495 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6496 |
mstore(pos, length) |
||
| 6497 |
let shift := sub(256, shl(3, length)) |
||
| 6498 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6499 |
} |
||
| 6500 |
m0 := mload(0x00) |
||
| 6501 |
m1 := mload(0x20) |
||
| 6502 |
m2 := mload(0x40) |
||
| 6503 |
m3 := mload(0x60) |
||
| 6504 |
m4 := mload(0x80) |
||
| 6505 |
m5 := mload(0xa0) |
||
| 6506 |
m6 := mload(0xc0) |
||
| 6507 |
// Selector of `log(bool,uint256,address,string)`. |
||
| 6508 |
mstore(0x00, 0x1bb3b09a) |
||
| 6509 |
mstore(0x20, p0) |
||
| 6510 |
mstore(0x40, p1) |
||
| 6511 |
mstore(0x60, p2) |
||
| 6512 |
mstore(0x80, 0x80) |
||
| 6513 |
writeString(0xa0, p3) |
||
| 6514 |
} |
||
| 6515 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6516 |
assembly {
|
||
| 6517 |
mstore(0x00, m0) |
||
| 6518 |
mstore(0x20, m1) |
||
| 6519 |
mstore(0x40, m2) |
||
| 6520 |
mstore(0x60, m3) |
||
| 6521 |
mstore(0x80, m4) |
||
| 6522 |
mstore(0xa0, m5) |
||
| 6523 |
mstore(0xc0, m6) |
||
| 6524 |
} |
||
| 6525 |
} |
||
| 6526 | |||
| 6527 |
function log(bool p0, uint256 p1, bool p2, address p3) internal pure {
|
||
| 6528 |
bytes32 m0; |
||
| 6529 |
bytes32 m1; |
||
| 6530 |
bytes32 m2; |
||
| 6531 |
bytes32 m3; |
||
| 6532 |
bytes32 m4; |
||
| 6533 |
assembly {
|
||
| 6534 |
m0 := mload(0x00) |
||
| 6535 |
m1 := mload(0x20) |
||
| 6536 |
m2 := mload(0x40) |
||
| 6537 |
m3 := mload(0x60) |
||
| 6538 |
m4 := mload(0x80) |
||
| 6539 |
// Selector of `log(bool,uint256,bool,address)`. |
||
| 6540 |
mstore(0x00, 0x9acd3616) |
||
| 6541 |
mstore(0x20, p0) |
||
| 6542 |
mstore(0x40, p1) |
||
| 6543 |
mstore(0x60, p2) |
||
| 6544 |
mstore(0x80, p3) |
||
| 6545 |
} |
||
| 6546 |
_sendLogPayload(0x1c, 0x84); |
||
| 6547 |
assembly {
|
||
| 6548 |
mstore(0x00, m0) |
||
| 6549 |
mstore(0x20, m1) |
||
| 6550 |
mstore(0x40, m2) |
||
| 6551 |
mstore(0x60, m3) |
||
| 6552 |
mstore(0x80, m4) |
||
| 6553 |
} |
||
| 6554 |
} |
||
| 6555 | |||
| 6556 |
function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {
|
||
| 6557 |
bytes32 m0; |
||
| 6558 |
bytes32 m1; |
||
| 6559 |
bytes32 m2; |
||
| 6560 |
bytes32 m3; |
||
| 6561 |
bytes32 m4; |
||
| 6562 |
assembly {
|
||
| 6563 |
m0 := mload(0x00) |
||
| 6564 |
m1 := mload(0x20) |
||
| 6565 |
m2 := mload(0x40) |
||
| 6566 |
m3 := mload(0x60) |
||
| 6567 |
m4 := mload(0x80) |
||
| 6568 |
// Selector of `log(bool,uint256,bool,bool)`. |
||
| 6569 |
mstore(0x00, 0xceb5f4d7) |
||
| 6570 |
mstore(0x20, p0) |
||
| 6571 |
mstore(0x40, p1) |
||
| 6572 |
mstore(0x60, p2) |
||
| 6573 |
mstore(0x80, p3) |
||
| 6574 |
} |
||
| 6575 |
_sendLogPayload(0x1c, 0x84); |
||
| 6576 |
assembly {
|
||
| 6577 |
mstore(0x00, m0) |
||
| 6578 |
mstore(0x20, m1) |
||
| 6579 |
mstore(0x40, m2) |
||
| 6580 |
mstore(0x60, m3) |
||
| 6581 |
mstore(0x80, m4) |
||
| 6582 |
} |
||
| 6583 |
} |
||
| 6584 | |||
| 6585 |
function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {
|
||
| 6586 |
bytes32 m0; |
||
| 6587 |
bytes32 m1; |
||
| 6588 |
bytes32 m2; |
||
| 6589 |
bytes32 m3; |
||
| 6590 |
bytes32 m4; |
||
| 6591 |
assembly {
|
||
| 6592 |
m0 := mload(0x00) |
||
| 6593 |
m1 := mload(0x20) |
||
| 6594 |
m2 := mload(0x40) |
||
| 6595 |
m3 := mload(0x60) |
||
| 6596 |
m4 := mload(0x80) |
||
| 6597 |
// Selector of `log(bool,uint256,bool,uint256)`. |
||
| 6598 |
mstore(0x00, 0x7f9bbca2) |
||
| 6599 |
mstore(0x20, p0) |
||
| 6600 |
mstore(0x40, p1) |
||
| 6601 |
mstore(0x60, p2) |
||
| 6602 |
mstore(0x80, p3) |
||
| 6603 |
} |
||
| 6604 |
_sendLogPayload(0x1c, 0x84); |
||
| 6605 |
assembly {
|
||
| 6606 |
mstore(0x00, m0) |
||
| 6607 |
mstore(0x20, m1) |
||
| 6608 |
mstore(0x40, m2) |
||
| 6609 |
mstore(0x60, m3) |
||
| 6610 |
mstore(0x80, m4) |
||
| 6611 |
} |
||
| 6612 |
} |
||
| 6613 | |||
| 6614 |
function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {
|
||
| 6615 |
bytes32 m0; |
||
| 6616 |
bytes32 m1; |
||
| 6617 |
bytes32 m2; |
||
| 6618 |
bytes32 m3; |
||
| 6619 |
bytes32 m4; |
||
| 6620 |
bytes32 m5; |
||
| 6621 |
bytes32 m6; |
||
| 6622 |
assembly {
|
||
| 6623 |
function writeString(pos, w) {
|
||
| 6624 |
let length := 0 |
||
| 6625 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6626 |
mstore(pos, length) |
||
| 6627 |
let shift := sub(256, shl(3, length)) |
||
| 6628 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6629 |
} |
||
| 6630 |
m0 := mload(0x00) |
||
| 6631 |
m1 := mload(0x20) |
||
| 6632 |
m2 := mload(0x40) |
||
| 6633 |
m3 := mload(0x60) |
||
| 6634 |
m4 := mload(0x80) |
||
| 6635 |
m5 := mload(0xa0) |
||
| 6636 |
m6 := mload(0xc0) |
||
| 6637 |
// Selector of `log(bool,uint256,bool,string)`. |
||
| 6638 |
mstore(0x00, 0x9143dbb1) |
||
| 6639 |
mstore(0x20, p0) |
||
| 6640 |
mstore(0x40, p1) |
||
| 6641 |
mstore(0x60, p2) |
||
| 6642 |
mstore(0x80, 0x80) |
||
| 6643 |
writeString(0xa0, p3) |
||
| 6644 |
} |
||
| 6645 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6646 |
assembly {
|
||
| 6647 |
mstore(0x00, m0) |
||
| 6648 |
mstore(0x20, m1) |
||
| 6649 |
mstore(0x40, m2) |
||
| 6650 |
mstore(0x60, m3) |
||
| 6651 |
mstore(0x80, m4) |
||
| 6652 |
mstore(0xa0, m5) |
||
| 6653 |
mstore(0xc0, m6) |
||
| 6654 |
} |
||
| 6655 |
} |
||
| 6656 | |||
| 6657 |
function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {
|
||
| 6658 |
bytes32 m0; |
||
| 6659 |
bytes32 m1; |
||
| 6660 |
bytes32 m2; |
||
| 6661 |
bytes32 m3; |
||
| 6662 |
bytes32 m4; |
||
| 6663 |
assembly {
|
||
| 6664 |
m0 := mload(0x00) |
||
| 6665 |
m1 := mload(0x20) |
||
| 6666 |
m2 := mload(0x40) |
||
| 6667 |
m3 := mload(0x60) |
||
| 6668 |
m4 := mload(0x80) |
||
| 6669 |
// Selector of `log(bool,uint256,uint256,address)`. |
||
| 6670 |
mstore(0x00, 0x00dd87b9) |
||
| 6671 |
mstore(0x20, p0) |
||
| 6672 |
mstore(0x40, p1) |
||
| 6673 |
mstore(0x60, p2) |
||
| 6674 |
mstore(0x80, p3) |
||
| 6675 |
} |
||
| 6676 |
_sendLogPayload(0x1c, 0x84); |
||
| 6677 |
assembly {
|
||
| 6678 |
mstore(0x00, m0) |
||
| 6679 |
mstore(0x20, m1) |
||
| 6680 |
mstore(0x40, m2) |
||
| 6681 |
mstore(0x60, m3) |
||
| 6682 |
mstore(0x80, m4) |
||
| 6683 |
} |
||
| 6684 |
} |
||
| 6685 | |||
| 6686 |
function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {
|
||
| 6687 |
bytes32 m0; |
||
| 6688 |
bytes32 m1; |
||
| 6689 |
bytes32 m2; |
||
| 6690 |
bytes32 m3; |
||
| 6691 |
bytes32 m4; |
||
| 6692 |
assembly {
|
||
| 6693 |
m0 := mload(0x00) |
||
| 6694 |
m1 := mload(0x20) |
||
| 6695 |
m2 := mload(0x40) |
||
| 6696 |
m3 := mload(0x60) |
||
| 6697 |
m4 := mload(0x80) |
||
| 6698 |
// Selector of `log(bool,uint256,uint256,bool)`. |
||
| 6699 |
mstore(0x00, 0xbe984353) |
||
| 6700 |
mstore(0x20, p0) |
||
| 6701 |
mstore(0x40, p1) |
||
| 6702 |
mstore(0x60, p2) |
||
| 6703 |
mstore(0x80, p3) |
||
| 6704 |
} |
||
| 6705 |
_sendLogPayload(0x1c, 0x84); |
||
| 6706 |
assembly {
|
||
| 6707 |
mstore(0x00, m0) |
||
| 6708 |
mstore(0x20, m1) |
||
| 6709 |
mstore(0x40, m2) |
||
| 6710 |
mstore(0x60, m3) |
||
| 6711 |
mstore(0x80, m4) |
||
| 6712 |
} |
||
| 6713 |
} |
||
| 6714 | |||
| 6715 |
function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 6716 |
bytes32 m0; |
||
| 6717 |
bytes32 m1; |
||
| 6718 |
bytes32 m2; |
||
| 6719 |
bytes32 m3; |
||
| 6720 |
bytes32 m4; |
||
| 6721 |
assembly {
|
||
| 6722 |
m0 := mload(0x00) |
||
| 6723 |
m1 := mload(0x20) |
||
| 6724 |
m2 := mload(0x40) |
||
| 6725 |
m3 := mload(0x60) |
||
| 6726 |
m4 := mload(0x80) |
||
| 6727 |
// Selector of `log(bool,uint256,uint256,uint256)`. |
||
| 6728 |
mstore(0x00, 0x374bb4b2) |
||
| 6729 |
mstore(0x20, p0) |
||
| 6730 |
mstore(0x40, p1) |
||
| 6731 |
mstore(0x60, p2) |
||
| 6732 |
mstore(0x80, p3) |
||
| 6733 |
} |
||
| 6734 |
_sendLogPayload(0x1c, 0x84); |
||
| 6735 |
assembly {
|
||
| 6736 |
mstore(0x00, m0) |
||
| 6737 |
mstore(0x20, m1) |
||
| 6738 |
mstore(0x40, m2) |
||
| 6739 |
mstore(0x60, m3) |
||
| 6740 |
mstore(0x80, m4) |
||
| 6741 |
} |
||
| 6742 |
} |
||
| 6743 | |||
| 6744 |
function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 6745 |
bytes32 m0; |
||
| 6746 |
bytes32 m1; |
||
| 6747 |
bytes32 m2; |
||
| 6748 |
bytes32 m3; |
||
| 6749 |
bytes32 m4; |
||
| 6750 |
bytes32 m5; |
||
| 6751 |
bytes32 m6; |
||
| 6752 |
assembly {
|
||
| 6753 |
function writeString(pos, w) {
|
||
| 6754 |
let length := 0 |
||
| 6755 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6756 |
mstore(pos, length) |
||
| 6757 |
let shift := sub(256, shl(3, length)) |
||
| 6758 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6759 |
} |
||
| 6760 |
m0 := mload(0x00) |
||
| 6761 |
m1 := mload(0x20) |
||
| 6762 |
m2 := mload(0x40) |
||
| 6763 |
m3 := mload(0x60) |
||
| 6764 |
m4 := mload(0x80) |
||
| 6765 |
m5 := mload(0xa0) |
||
| 6766 |
m6 := mload(0xc0) |
||
| 6767 |
// Selector of `log(bool,uint256,uint256,string)`. |
||
| 6768 |
mstore(0x00, 0x8e69fb5d) |
||
| 6769 |
mstore(0x20, p0) |
||
| 6770 |
mstore(0x40, p1) |
||
| 6771 |
mstore(0x60, p2) |
||
| 6772 |
mstore(0x80, 0x80) |
||
| 6773 |
writeString(0xa0, p3) |
||
| 6774 |
} |
||
| 6775 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6776 |
assembly {
|
||
| 6777 |
mstore(0x00, m0) |
||
| 6778 |
mstore(0x20, m1) |
||
| 6779 |
mstore(0x40, m2) |
||
| 6780 |
mstore(0x60, m3) |
||
| 6781 |
mstore(0x80, m4) |
||
| 6782 |
mstore(0xa0, m5) |
||
| 6783 |
mstore(0xc0, m6) |
||
| 6784 |
} |
||
| 6785 |
} |
||
| 6786 | |||
| 6787 |
function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {
|
||
| 6788 |
bytes32 m0; |
||
| 6789 |
bytes32 m1; |
||
| 6790 |
bytes32 m2; |
||
| 6791 |
bytes32 m3; |
||
| 6792 |
bytes32 m4; |
||
| 6793 |
bytes32 m5; |
||
| 6794 |
bytes32 m6; |
||
| 6795 |
assembly {
|
||
| 6796 |
function writeString(pos, w) {
|
||
| 6797 |
let length := 0 |
||
| 6798 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6799 |
mstore(pos, length) |
||
| 6800 |
let shift := sub(256, shl(3, length)) |
||
| 6801 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6802 |
} |
||
| 6803 |
m0 := mload(0x00) |
||
| 6804 |
m1 := mload(0x20) |
||
| 6805 |
m2 := mload(0x40) |
||
| 6806 |
m3 := mload(0x60) |
||
| 6807 |
m4 := mload(0x80) |
||
| 6808 |
m5 := mload(0xa0) |
||
| 6809 |
m6 := mload(0xc0) |
||
| 6810 |
// Selector of `log(bool,uint256,string,address)`. |
||
| 6811 |
mstore(0x00, 0xfedd1fff) |
||
| 6812 |
mstore(0x20, p0) |
||
| 6813 |
mstore(0x40, p1) |
||
| 6814 |
mstore(0x60, 0x80) |
||
| 6815 |
mstore(0x80, p3) |
||
| 6816 |
writeString(0xa0, p2) |
||
| 6817 |
} |
||
| 6818 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6819 |
assembly {
|
||
| 6820 |
mstore(0x00, m0) |
||
| 6821 |
mstore(0x20, m1) |
||
| 6822 |
mstore(0x40, m2) |
||
| 6823 |
mstore(0x60, m3) |
||
| 6824 |
mstore(0x80, m4) |
||
| 6825 |
mstore(0xa0, m5) |
||
| 6826 |
mstore(0xc0, m6) |
||
| 6827 |
} |
||
| 6828 |
} |
||
| 6829 | |||
| 6830 |
function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {
|
||
| 6831 |
bytes32 m0; |
||
| 6832 |
bytes32 m1; |
||
| 6833 |
bytes32 m2; |
||
| 6834 |
bytes32 m3; |
||
| 6835 |
bytes32 m4; |
||
| 6836 |
bytes32 m5; |
||
| 6837 |
bytes32 m6; |
||
| 6838 |
assembly {
|
||
| 6839 |
function writeString(pos, w) {
|
||
| 6840 |
let length := 0 |
||
| 6841 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6842 |
mstore(pos, length) |
||
| 6843 |
let shift := sub(256, shl(3, length)) |
||
| 6844 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6845 |
} |
||
| 6846 |
m0 := mload(0x00) |
||
| 6847 |
m1 := mload(0x20) |
||
| 6848 |
m2 := mload(0x40) |
||
| 6849 |
m3 := mload(0x60) |
||
| 6850 |
m4 := mload(0x80) |
||
| 6851 |
m5 := mload(0xa0) |
||
| 6852 |
m6 := mload(0xc0) |
||
| 6853 |
// Selector of `log(bool,uint256,string,bool)`. |
||
| 6854 |
mstore(0x00, 0xe5e70b2b) |
||
| 6855 |
mstore(0x20, p0) |
||
| 6856 |
mstore(0x40, p1) |
||
| 6857 |
mstore(0x60, 0x80) |
||
| 6858 |
mstore(0x80, p3) |
||
| 6859 |
writeString(0xa0, p2) |
||
| 6860 |
} |
||
| 6861 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6862 |
assembly {
|
||
| 6863 |
mstore(0x00, m0) |
||
| 6864 |
mstore(0x20, m1) |
||
| 6865 |
mstore(0x40, m2) |
||
| 6866 |
mstore(0x60, m3) |
||
| 6867 |
mstore(0x80, m4) |
||
| 6868 |
mstore(0xa0, m5) |
||
| 6869 |
mstore(0xc0, m6) |
||
| 6870 |
} |
||
| 6871 |
} |
||
| 6872 | |||
| 6873 |
function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 6874 |
bytes32 m0; |
||
| 6875 |
bytes32 m1; |
||
| 6876 |
bytes32 m2; |
||
| 6877 |
bytes32 m3; |
||
| 6878 |
bytes32 m4; |
||
| 6879 |
bytes32 m5; |
||
| 6880 |
bytes32 m6; |
||
| 6881 |
assembly {
|
||
| 6882 |
function writeString(pos, w) {
|
||
| 6883 |
let length := 0 |
||
| 6884 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6885 |
mstore(pos, length) |
||
| 6886 |
let shift := sub(256, shl(3, length)) |
||
| 6887 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6888 |
} |
||
| 6889 |
m0 := mload(0x00) |
||
| 6890 |
m1 := mload(0x20) |
||
| 6891 |
m2 := mload(0x40) |
||
| 6892 |
m3 := mload(0x60) |
||
| 6893 |
m4 := mload(0x80) |
||
| 6894 |
m5 := mload(0xa0) |
||
| 6895 |
m6 := mload(0xc0) |
||
| 6896 |
// Selector of `log(bool,uint256,string,uint256)`. |
||
| 6897 |
mstore(0x00, 0x6a1199e2) |
||
| 6898 |
mstore(0x20, p0) |
||
| 6899 |
mstore(0x40, p1) |
||
| 6900 |
mstore(0x60, 0x80) |
||
| 6901 |
mstore(0x80, p3) |
||
| 6902 |
writeString(0xa0, p2) |
||
| 6903 |
} |
||
| 6904 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6905 |
assembly {
|
||
| 6906 |
mstore(0x00, m0) |
||
| 6907 |
mstore(0x20, m1) |
||
| 6908 |
mstore(0x40, m2) |
||
| 6909 |
mstore(0x60, m3) |
||
| 6910 |
mstore(0x80, m4) |
||
| 6911 |
mstore(0xa0, m5) |
||
| 6912 |
mstore(0xc0, m6) |
||
| 6913 |
} |
||
| 6914 |
} |
||
| 6915 | |||
| 6916 |
function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 6917 |
bytes32 m0; |
||
| 6918 |
bytes32 m1; |
||
| 6919 |
bytes32 m2; |
||
| 6920 |
bytes32 m3; |
||
| 6921 |
bytes32 m4; |
||
| 6922 |
bytes32 m5; |
||
| 6923 |
bytes32 m6; |
||
| 6924 |
bytes32 m7; |
||
| 6925 |
bytes32 m8; |
||
| 6926 |
assembly {
|
||
| 6927 |
function writeString(pos, w) {
|
||
| 6928 |
let length := 0 |
||
| 6929 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6930 |
mstore(pos, length) |
||
| 6931 |
let shift := sub(256, shl(3, length)) |
||
| 6932 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6933 |
} |
||
| 6934 |
m0 := mload(0x00) |
||
| 6935 |
m1 := mload(0x20) |
||
| 6936 |
m2 := mload(0x40) |
||
| 6937 |
m3 := mload(0x60) |
||
| 6938 |
m4 := mload(0x80) |
||
| 6939 |
m5 := mload(0xa0) |
||
| 6940 |
m6 := mload(0xc0) |
||
| 6941 |
m7 := mload(0xe0) |
||
| 6942 |
m8 := mload(0x100) |
||
| 6943 |
// Selector of `log(bool,uint256,string,string)`. |
||
| 6944 |
mstore(0x00, 0xf5bc2249) |
||
| 6945 |
mstore(0x20, p0) |
||
| 6946 |
mstore(0x40, p1) |
||
| 6947 |
mstore(0x60, 0x80) |
||
| 6948 |
mstore(0x80, 0xc0) |
||
| 6949 |
writeString(0xa0, p2) |
||
| 6950 |
writeString(0xe0, p3) |
||
| 6951 |
} |
||
| 6952 |
_sendLogPayload(0x1c, 0x104); |
||
| 6953 |
assembly {
|
||
| 6954 |
mstore(0x00, m0) |
||
| 6955 |
mstore(0x20, m1) |
||
| 6956 |
mstore(0x40, m2) |
||
| 6957 |
mstore(0x60, m3) |
||
| 6958 |
mstore(0x80, m4) |
||
| 6959 |
mstore(0xa0, m5) |
||
| 6960 |
mstore(0xc0, m6) |
||
| 6961 |
mstore(0xe0, m7) |
||
| 6962 |
mstore(0x100, m8) |
||
| 6963 |
} |
||
| 6964 |
} |
||
| 6965 | |||
| 6966 |
function log(bool p0, bytes32 p1, address p2, address p3) internal pure {
|
||
| 6967 |
bytes32 m0; |
||
| 6968 |
bytes32 m1; |
||
| 6969 |
bytes32 m2; |
||
| 6970 |
bytes32 m3; |
||
| 6971 |
bytes32 m4; |
||
| 6972 |
bytes32 m5; |
||
| 6973 |
bytes32 m6; |
||
| 6974 |
assembly {
|
||
| 6975 |
function writeString(pos, w) {
|
||
| 6976 |
let length := 0 |
||
| 6977 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 6978 |
mstore(pos, length) |
||
| 6979 |
let shift := sub(256, shl(3, length)) |
||
| 6980 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 6981 |
} |
||
| 6982 |
m0 := mload(0x00) |
||
| 6983 |
m1 := mload(0x20) |
||
| 6984 |
m2 := mload(0x40) |
||
| 6985 |
m3 := mload(0x60) |
||
| 6986 |
m4 := mload(0x80) |
||
| 6987 |
m5 := mload(0xa0) |
||
| 6988 |
m6 := mload(0xc0) |
||
| 6989 |
// Selector of `log(bool,string,address,address)`. |
||
| 6990 |
mstore(0x00, 0x2b2b18dc) |
||
| 6991 |
mstore(0x20, p0) |
||
| 6992 |
mstore(0x40, 0x80) |
||
| 6993 |
mstore(0x60, p2) |
||
| 6994 |
mstore(0x80, p3) |
||
| 6995 |
writeString(0xa0, p1) |
||
| 6996 |
} |
||
| 6997 |
_sendLogPayload(0x1c, 0xc4); |
||
| 6998 |
assembly {
|
||
| 6999 |
mstore(0x00, m0) |
||
| 7000 |
mstore(0x20, m1) |
||
| 7001 |
mstore(0x40, m2) |
||
| 7002 |
mstore(0x60, m3) |
||
| 7003 |
mstore(0x80, m4) |
||
| 7004 |
mstore(0xa0, m5) |
||
| 7005 |
mstore(0xc0, m6) |
||
| 7006 |
} |
||
| 7007 |
} |
||
| 7008 | |||
| 7009 |
function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {
|
||
| 7010 |
bytes32 m0; |
||
| 7011 |
bytes32 m1; |
||
| 7012 |
bytes32 m2; |
||
| 7013 |
bytes32 m3; |
||
| 7014 |
bytes32 m4; |
||
| 7015 |
bytes32 m5; |
||
| 7016 |
bytes32 m6; |
||
| 7017 |
assembly {
|
||
| 7018 |
function writeString(pos, w) {
|
||
| 7019 |
let length := 0 |
||
| 7020 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7021 |
mstore(pos, length) |
||
| 7022 |
let shift := sub(256, shl(3, length)) |
||
| 7023 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7024 |
} |
||
| 7025 |
m0 := mload(0x00) |
||
| 7026 |
m1 := mload(0x20) |
||
| 7027 |
m2 := mload(0x40) |
||
| 7028 |
m3 := mload(0x60) |
||
| 7029 |
m4 := mload(0x80) |
||
| 7030 |
m5 := mload(0xa0) |
||
| 7031 |
m6 := mload(0xc0) |
||
| 7032 |
// Selector of `log(bool,string,address,bool)`. |
||
| 7033 |
mstore(0x00, 0x6dd434ca) |
||
| 7034 |
mstore(0x20, p0) |
||
| 7035 |
mstore(0x40, 0x80) |
||
| 7036 |
mstore(0x60, p2) |
||
| 7037 |
mstore(0x80, p3) |
||
| 7038 |
writeString(0xa0, p1) |
||
| 7039 |
} |
||
| 7040 |
_sendLogPayload(0x1c, 0xc4); |
||
| 7041 |
assembly {
|
||
| 7042 |
mstore(0x00, m0) |
||
| 7043 |
mstore(0x20, m1) |
||
| 7044 |
mstore(0x40, m2) |
||
| 7045 |
mstore(0x60, m3) |
||
| 7046 |
mstore(0x80, m4) |
||
| 7047 |
mstore(0xa0, m5) |
||
| 7048 |
mstore(0xc0, m6) |
||
| 7049 |
} |
||
| 7050 |
} |
||
| 7051 | |||
| 7052 |
function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {
|
||
| 7053 |
bytes32 m0; |
||
| 7054 |
bytes32 m1; |
||
| 7055 |
bytes32 m2; |
||
| 7056 |
bytes32 m3; |
||
| 7057 |
bytes32 m4; |
||
| 7058 |
bytes32 m5; |
||
| 7059 |
bytes32 m6; |
||
| 7060 |
assembly {
|
||
| 7061 |
function writeString(pos, w) {
|
||
| 7062 |
let length := 0 |
||
| 7063 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7064 |
mstore(pos, length) |
||
| 7065 |
let shift := sub(256, shl(3, length)) |
||
| 7066 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7067 |
} |
||
| 7068 |
m0 := mload(0x00) |
||
| 7069 |
m1 := mload(0x20) |
||
| 7070 |
m2 := mload(0x40) |
||
| 7071 |
m3 := mload(0x60) |
||
| 7072 |
m4 := mload(0x80) |
||
| 7073 |
m5 := mload(0xa0) |
||
| 7074 |
m6 := mload(0xc0) |
||
| 7075 |
// Selector of `log(bool,string,address,uint256)`. |
||
| 7076 |
mstore(0x00, 0xa5cada94) |
||
| 7077 |
mstore(0x20, p0) |
||
| 7078 |
mstore(0x40, 0x80) |
||
| 7079 |
mstore(0x60, p2) |
||
| 7080 |
mstore(0x80, p3) |
||
| 7081 |
writeString(0xa0, p1) |
||
| 7082 |
} |
||
| 7083 |
_sendLogPayload(0x1c, 0xc4); |
||
| 7084 |
assembly {
|
||
| 7085 |
mstore(0x00, m0) |
||
| 7086 |
mstore(0x20, m1) |
||
| 7087 |
mstore(0x40, m2) |
||
| 7088 |
mstore(0x60, m3) |
||
| 7089 |
mstore(0x80, m4) |
||
| 7090 |
mstore(0xa0, m5) |
||
| 7091 |
mstore(0xc0, m6) |
||
| 7092 |
} |
||
| 7093 |
} |
||
| 7094 | |||
| 7095 |
function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {
|
||
| 7096 |
bytes32 m0; |
||
| 7097 |
bytes32 m1; |
||
| 7098 |
bytes32 m2; |
||
| 7099 |
bytes32 m3; |
||
| 7100 |
bytes32 m4; |
||
| 7101 |
bytes32 m5; |
||
| 7102 |
bytes32 m6; |
||
| 7103 |
bytes32 m7; |
||
| 7104 |
bytes32 m8; |
||
| 7105 |
assembly {
|
||
| 7106 |
function writeString(pos, w) {
|
||
| 7107 |
let length := 0 |
||
| 7108 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7109 |
mstore(pos, length) |
||
| 7110 |
let shift := sub(256, shl(3, length)) |
||
| 7111 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7112 |
} |
||
| 7113 |
m0 := mload(0x00) |
||
| 7114 |
m1 := mload(0x20) |
||
| 7115 |
m2 := mload(0x40) |
||
| 7116 |
m3 := mload(0x60) |
||
| 7117 |
m4 := mload(0x80) |
||
| 7118 |
m5 := mload(0xa0) |
||
| 7119 |
m6 := mload(0xc0) |
||
| 7120 |
m7 := mload(0xe0) |
||
| 7121 |
m8 := mload(0x100) |
||
| 7122 |
// Selector of `log(bool,string,address,string)`. |
||
| 7123 |
mstore(0x00, 0x12d6c788) |
||
| 7124 |
mstore(0x20, p0) |
||
| 7125 |
mstore(0x40, 0x80) |
||
| 7126 |
mstore(0x60, p2) |
||
| 7127 |
mstore(0x80, 0xc0) |
||
| 7128 |
writeString(0xa0, p1) |
||
| 7129 |
writeString(0xe0, p3) |
||
| 7130 |
} |
||
| 7131 |
_sendLogPayload(0x1c, 0x104); |
||
| 7132 |
assembly {
|
||
| 7133 |
mstore(0x00, m0) |
||
| 7134 |
mstore(0x20, m1) |
||
| 7135 |
mstore(0x40, m2) |
||
| 7136 |
mstore(0x60, m3) |
||
| 7137 |
mstore(0x80, m4) |
||
| 7138 |
mstore(0xa0, m5) |
||
| 7139 |
mstore(0xc0, m6) |
||
| 7140 |
mstore(0xe0, m7) |
||
| 7141 |
mstore(0x100, m8) |
||
| 7142 |
} |
||
| 7143 |
} |
||
| 7144 | |||
| 7145 |
function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {
|
||
| 7146 |
bytes32 m0; |
||
| 7147 |
bytes32 m1; |
||
| 7148 |
bytes32 m2; |
||
| 7149 |
bytes32 m3; |
||
| 7150 |
bytes32 m4; |
||
| 7151 |
bytes32 m5; |
||
| 7152 |
bytes32 m6; |
||
| 7153 |
assembly {
|
||
| 7154 |
function writeString(pos, w) {
|
||
| 7155 |
let length := 0 |
||
| 7156 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7157 |
mstore(pos, length) |
||
| 7158 |
let shift := sub(256, shl(3, length)) |
||
| 7159 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7160 |
} |
||
| 7161 |
m0 := mload(0x00) |
||
| 7162 |
m1 := mload(0x20) |
||
| 7163 |
m2 := mload(0x40) |
||
| 7164 |
m3 := mload(0x60) |
||
| 7165 |
m4 := mload(0x80) |
||
| 7166 |
m5 := mload(0xa0) |
||
| 7167 |
m6 := mload(0xc0) |
||
| 7168 |
// Selector of `log(bool,string,bool,address)`. |
||
| 7169 |
mstore(0x00, 0x538e06ab) |
||
| 7170 |
mstore(0x20, p0) |
||
| 7171 |
mstore(0x40, 0x80) |
||
| 7172 |
mstore(0x60, p2) |
||
| 7173 |
mstore(0x80, p3) |
||
| 7174 |
writeString(0xa0, p1) |
||
| 7175 |
} |
||
| 7176 |
_sendLogPayload(0x1c, 0xc4); |
||
| 7177 |
assembly {
|
||
| 7178 |
mstore(0x00, m0) |
||
| 7179 |
mstore(0x20, m1) |
||
| 7180 |
mstore(0x40, m2) |
||
| 7181 |
mstore(0x60, m3) |
||
| 7182 |
mstore(0x80, m4) |
||
| 7183 |
mstore(0xa0, m5) |
||
| 7184 |
mstore(0xc0, m6) |
||
| 7185 |
} |
||
| 7186 |
} |
||
| 7187 | |||
| 7188 |
function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {
|
||
| 7189 |
bytes32 m0; |
||
| 7190 |
bytes32 m1; |
||
| 7191 |
bytes32 m2; |
||
| 7192 |
bytes32 m3; |
||
| 7193 |
bytes32 m4; |
||
| 7194 |
bytes32 m5; |
||
| 7195 |
bytes32 m6; |
||
| 7196 |
assembly {
|
||
| 7197 |
function writeString(pos, w) {
|
||
| 7198 |
let length := 0 |
||
| 7199 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7200 |
mstore(pos, length) |
||
| 7201 |
let shift := sub(256, shl(3, length)) |
||
| 7202 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7203 |
} |
||
| 7204 |
m0 := mload(0x00) |
||
| 7205 |
m1 := mload(0x20) |
||
| 7206 |
m2 := mload(0x40) |
||
| 7207 |
m3 := mload(0x60) |
||
| 7208 |
m4 := mload(0x80) |
||
| 7209 |
m5 := mload(0xa0) |
||
| 7210 |
m6 := mload(0xc0) |
||
| 7211 |
// Selector of `log(bool,string,bool,bool)`. |
||
| 7212 |
mstore(0x00, 0xdc5e935b) |
||
| 7213 |
mstore(0x20, p0) |
||
| 7214 |
mstore(0x40, 0x80) |
||
| 7215 |
mstore(0x60, p2) |
||
| 7216 |
mstore(0x80, p3) |
||
| 7217 |
writeString(0xa0, p1) |
||
| 7218 |
} |
||
| 7219 |
_sendLogPayload(0x1c, 0xc4); |
||
| 7220 |
assembly {
|
||
| 7221 |
mstore(0x00, m0) |
||
| 7222 |
mstore(0x20, m1) |
||
| 7223 |
mstore(0x40, m2) |
||
| 7224 |
mstore(0x60, m3) |
||
| 7225 |
mstore(0x80, m4) |
||
| 7226 |
mstore(0xa0, m5) |
||
| 7227 |
mstore(0xc0, m6) |
||
| 7228 |
} |
||
| 7229 |
} |
||
| 7230 | |||
| 7231 |
function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {
|
||
| 7232 |
bytes32 m0; |
||
| 7233 |
bytes32 m1; |
||
| 7234 |
bytes32 m2; |
||
| 7235 |
bytes32 m3; |
||
| 7236 |
bytes32 m4; |
||
| 7237 |
bytes32 m5; |
||
| 7238 |
bytes32 m6; |
||
| 7239 |
assembly {
|
||
| 7240 |
function writeString(pos, w) {
|
||
| 7241 |
let length := 0 |
||
| 7242 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7243 |
mstore(pos, length) |
||
| 7244 |
let shift := sub(256, shl(3, length)) |
||
| 7245 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7246 |
} |
||
| 7247 |
m0 := mload(0x00) |
||
| 7248 |
m1 := mload(0x20) |
||
| 7249 |
m2 := mload(0x40) |
||
| 7250 |
m3 := mload(0x60) |
||
| 7251 |
m4 := mload(0x80) |
||
| 7252 |
m5 := mload(0xa0) |
||
| 7253 |
m6 := mload(0xc0) |
||
| 7254 |
// Selector of `log(bool,string,bool,uint256)`. |
||
| 7255 |
mstore(0x00, 0x1606a393) |
||
| 7256 |
mstore(0x20, p0) |
||
| 7257 |
mstore(0x40, 0x80) |
||
| 7258 |
mstore(0x60, p2) |
||
| 7259 |
mstore(0x80, p3) |
||
| 7260 |
writeString(0xa0, p1) |
||
| 7261 |
} |
||
| 7262 |
_sendLogPayload(0x1c, 0xc4); |
||
| 7263 |
assembly {
|
||
| 7264 |
mstore(0x00, m0) |
||
| 7265 |
mstore(0x20, m1) |
||
| 7266 |
mstore(0x40, m2) |
||
| 7267 |
mstore(0x60, m3) |
||
| 7268 |
mstore(0x80, m4) |
||
| 7269 |
mstore(0xa0, m5) |
||
| 7270 |
mstore(0xc0, m6) |
||
| 7271 |
} |
||
| 7272 |
} |
||
| 7273 | |||
| 7274 |
function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {
|
||
| 7275 |
bytes32 m0; |
||
| 7276 |
bytes32 m1; |
||
| 7277 |
bytes32 m2; |
||
| 7278 |
bytes32 m3; |
||
| 7279 |
bytes32 m4; |
||
| 7280 |
bytes32 m5; |
||
| 7281 |
bytes32 m6; |
||
| 7282 |
bytes32 m7; |
||
| 7283 |
bytes32 m8; |
||
| 7284 |
assembly {
|
||
| 7285 |
function writeString(pos, w) {
|
||
| 7286 |
let length := 0 |
||
| 7287 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7288 |
mstore(pos, length) |
||
| 7289 |
let shift := sub(256, shl(3, length)) |
||
| 7290 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7291 |
} |
||
| 7292 |
m0 := mload(0x00) |
||
| 7293 |
m1 := mload(0x20) |
||
| 7294 |
m2 := mload(0x40) |
||
| 7295 |
m3 := mload(0x60) |
||
| 7296 |
m4 := mload(0x80) |
||
| 7297 |
m5 := mload(0xa0) |
||
| 7298 |
m6 := mload(0xc0) |
||
| 7299 |
m7 := mload(0xe0) |
||
| 7300 |
m8 := mload(0x100) |
||
| 7301 |
// Selector of `log(bool,string,bool,string)`. |
||
| 7302 |
mstore(0x00, 0x483d0416) |
||
| 7303 |
mstore(0x20, p0) |
||
| 7304 |
mstore(0x40, 0x80) |
||
| 7305 |
mstore(0x60, p2) |
||
| 7306 |
mstore(0x80, 0xc0) |
||
| 7307 |
writeString(0xa0, p1) |
||
| 7308 |
writeString(0xe0, p3) |
||
| 7309 |
} |
||
| 7310 |
_sendLogPayload(0x1c, 0x104); |
||
| 7311 |
assembly {
|
||
| 7312 |
mstore(0x00, m0) |
||
| 7313 |
mstore(0x20, m1) |
||
| 7314 |
mstore(0x40, m2) |
||
| 7315 |
mstore(0x60, m3) |
||
| 7316 |
mstore(0x80, m4) |
||
| 7317 |
mstore(0xa0, m5) |
||
| 7318 |
mstore(0xc0, m6) |
||
| 7319 |
mstore(0xe0, m7) |
||
| 7320 |
mstore(0x100, m8) |
||
| 7321 |
} |
||
| 7322 |
} |
||
| 7323 | |||
| 7324 |
function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {
|
||
| 7325 |
bytes32 m0; |
||
| 7326 |
bytes32 m1; |
||
| 7327 |
bytes32 m2; |
||
| 7328 |
bytes32 m3; |
||
| 7329 |
bytes32 m4; |
||
| 7330 |
bytes32 m5; |
||
| 7331 |
bytes32 m6; |
||
| 7332 |
assembly {
|
||
| 7333 |
function writeString(pos, w) {
|
||
| 7334 |
let length := 0 |
||
| 7335 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7336 |
mstore(pos, length) |
||
| 7337 |
let shift := sub(256, shl(3, length)) |
||
| 7338 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7339 |
} |
||
| 7340 |
m0 := mload(0x00) |
||
| 7341 |
m1 := mload(0x20) |
||
| 7342 |
m2 := mload(0x40) |
||
| 7343 |
m3 := mload(0x60) |
||
| 7344 |
m4 := mload(0x80) |
||
| 7345 |
m5 := mload(0xa0) |
||
| 7346 |
m6 := mload(0xc0) |
||
| 7347 |
// Selector of `log(bool,string,uint256,address)`. |
||
| 7348 |
mstore(0x00, 0x1596a1ce) |
||
| 7349 |
mstore(0x20, p0) |
||
| 7350 |
mstore(0x40, 0x80) |
||
| 7351 |
mstore(0x60, p2) |
||
| 7352 |
mstore(0x80, p3) |
||
| 7353 |
writeString(0xa0, p1) |
||
| 7354 |
} |
||
| 7355 |
_sendLogPayload(0x1c, 0xc4); |
||
| 7356 |
assembly {
|
||
| 7357 |
mstore(0x00, m0) |
||
| 7358 |
mstore(0x20, m1) |
||
| 7359 |
mstore(0x40, m2) |
||
| 7360 |
mstore(0x60, m3) |
||
| 7361 |
mstore(0x80, m4) |
||
| 7362 |
mstore(0xa0, m5) |
||
| 7363 |
mstore(0xc0, m6) |
||
| 7364 |
} |
||
| 7365 |
} |
||
| 7366 | |||
| 7367 |
function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {
|
||
| 7368 |
bytes32 m0; |
||
| 7369 |
bytes32 m1; |
||
| 7370 |
bytes32 m2; |
||
| 7371 |
bytes32 m3; |
||
| 7372 |
bytes32 m4; |
||
| 7373 |
bytes32 m5; |
||
| 7374 |
bytes32 m6; |
||
| 7375 |
assembly {
|
||
| 7376 |
function writeString(pos, w) {
|
||
| 7377 |
let length := 0 |
||
| 7378 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7379 |
mstore(pos, length) |
||
| 7380 |
let shift := sub(256, shl(3, length)) |
||
| 7381 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7382 |
} |
||
| 7383 |
m0 := mload(0x00) |
||
| 7384 |
m1 := mload(0x20) |
||
| 7385 |
m2 := mload(0x40) |
||
| 7386 |
m3 := mload(0x60) |
||
| 7387 |
m4 := mload(0x80) |
||
| 7388 |
m5 := mload(0xa0) |
||
| 7389 |
m6 := mload(0xc0) |
||
| 7390 |
// Selector of `log(bool,string,uint256,bool)`. |
||
| 7391 |
mstore(0x00, 0x6b0e5d53) |
||
| 7392 |
mstore(0x20, p0) |
||
| 7393 |
mstore(0x40, 0x80) |
||
| 7394 |
mstore(0x60, p2) |
||
| 7395 |
mstore(0x80, p3) |
||
| 7396 |
writeString(0xa0, p1) |
||
| 7397 |
} |
||
| 7398 |
_sendLogPayload(0x1c, 0xc4); |
||
| 7399 |
assembly {
|
||
| 7400 |
mstore(0x00, m0) |
||
| 7401 |
mstore(0x20, m1) |
||
| 7402 |
mstore(0x40, m2) |
||
| 7403 |
mstore(0x60, m3) |
||
| 7404 |
mstore(0x80, m4) |
||
| 7405 |
mstore(0xa0, m5) |
||
| 7406 |
mstore(0xc0, m6) |
||
| 7407 |
} |
||
| 7408 |
} |
||
| 7409 | |||
| 7410 |
function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 7411 |
bytes32 m0; |
||
| 7412 |
bytes32 m1; |
||
| 7413 |
bytes32 m2; |
||
| 7414 |
bytes32 m3; |
||
| 7415 |
bytes32 m4; |
||
| 7416 |
bytes32 m5; |
||
| 7417 |
bytes32 m6; |
||
| 7418 |
assembly {
|
||
| 7419 |
function writeString(pos, w) {
|
||
| 7420 |
let length := 0 |
||
| 7421 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7422 |
mstore(pos, length) |
||
| 7423 |
let shift := sub(256, shl(3, length)) |
||
| 7424 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7425 |
} |
||
| 7426 |
m0 := mload(0x00) |
||
| 7427 |
m1 := mload(0x20) |
||
| 7428 |
m2 := mload(0x40) |
||
| 7429 |
m3 := mload(0x60) |
||
| 7430 |
m4 := mload(0x80) |
||
| 7431 |
m5 := mload(0xa0) |
||
| 7432 |
m6 := mload(0xc0) |
||
| 7433 |
// Selector of `log(bool,string,uint256,uint256)`. |
||
| 7434 |
mstore(0x00, 0x28863fcb) |
||
| 7435 |
mstore(0x20, p0) |
||
| 7436 |
mstore(0x40, 0x80) |
||
| 7437 |
mstore(0x60, p2) |
||
| 7438 |
mstore(0x80, p3) |
||
| 7439 |
writeString(0xa0, p1) |
||
| 7440 |
} |
||
| 7441 |
_sendLogPayload(0x1c, 0xc4); |
||
| 7442 |
assembly {
|
||
| 7443 |
mstore(0x00, m0) |
||
| 7444 |
mstore(0x20, m1) |
||
| 7445 |
mstore(0x40, m2) |
||
| 7446 |
mstore(0x60, m3) |
||
| 7447 |
mstore(0x80, m4) |
||
| 7448 |
mstore(0xa0, m5) |
||
| 7449 |
mstore(0xc0, m6) |
||
| 7450 |
} |
||
| 7451 |
} |
||
| 7452 | |||
| 7453 |
function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 7454 |
bytes32 m0; |
||
| 7455 |
bytes32 m1; |
||
| 7456 |
bytes32 m2; |
||
| 7457 |
bytes32 m3; |
||
| 7458 |
bytes32 m4; |
||
| 7459 |
bytes32 m5; |
||
| 7460 |
bytes32 m6; |
||
| 7461 |
bytes32 m7; |
||
| 7462 |
bytes32 m8; |
||
| 7463 |
assembly {
|
||
| 7464 |
function writeString(pos, w) {
|
||
| 7465 |
let length := 0 |
||
| 7466 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7467 |
mstore(pos, length) |
||
| 7468 |
let shift := sub(256, shl(3, length)) |
||
| 7469 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7470 |
} |
||
| 7471 |
m0 := mload(0x00) |
||
| 7472 |
m1 := mload(0x20) |
||
| 7473 |
m2 := mload(0x40) |
||
| 7474 |
m3 := mload(0x60) |
||
| 7475 |
m4 := mload(0x80) |
||
| 7476 |
m5 := mload(0xa0) |
||
| 7477 |
m6 := mload(0xc0) |
||
| 7478 |
m7 := mload(0xe0) |
||
| 7479 |
m8 := mload(0x100) |
||
| 7480 |
// Selector of `log(bool,string,uint256,string)`. |
||
| 7481 |
mstore(0x00, 0x1ad96de6) |
||
| 7482 |
mstore(0x20, p0) |
||
| 7483 |
mstore(0x40, 0x80) |
||
| 7484 |
mstore(0x60, p2) |
||
| 7485 |
mstore(0x80, 0xc0) |
||
| 7486 |
writeString(0xa0, p1) |
||
| 7487 |
writeString(0xe0, p3) |
||
| 7488 |
} |
||
| 7489 |
_sendLogPayload(0x1c, 0x104); |
||
| 7490 |
assembly {
|
||
| 7491 |
mstore(0x00, m0) |
||
| 7492 |
mstore(0x20, m1) |
||
| 7493 |
mstore(0x40, m2) |
||
| 7494 |
mstore(0x60, m3) |
||
| 7495 |
mstore(0x80, m4) |
||
| 7496 |
mstore(0xa0, m5) |
||
| 7497 |
mstore(0xc0, m6) |
||
| 7498 |
mstore(0xe0, m7) |
||
| 7499 |
mstore(0x100, m8) |
||
| 7500 |
} |
||
| 7501 |
} |
||
| 7502 | |||
| 7503 |
function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {
|
||
| 7504 |
bytes32 m0; |
||
| 7505 |
bytes32 m1; |
||
| 7506 |
bytes32 m2; |
||
| 7507 |
bytes32 m3; |
||
| 7508 |
bytes32 m4; |
||
| 7509 |
bytes32 m5; |
||
| 7510 |
bytes32 m6; |
||
| 7511 |
bytes32 m7; |
||
| 7512 |
bytes32 m8; |
||
| 7513 |
assembly {
|
||
| 7514 |
function writeString(pos, w) {
|
||
| 7515 |
let length := 0 |
||
| 7516 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7517 |
mstore(pos, length) |
||
| 7518 |
let shift := sub(256, shl(3, length)) |
||
| 7519 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7520 |
} |
||
| 7521 |
m0 := mload(0x00) |
||
| 7522 |
m1 := mload(0x20) |
||
| 7523 |
m2 := mload(0x40) |
||
| 7524 |
m3 := mload(0x60) |
||
| 7525 |
m4 := mload(0x80) |
||
| 7526 |
m5 := mload(0xa0) |
||
| 7527 |
m6 := mload(0xc0) |
||
| 7528 |
m7 := mload(0xe0) |
||
| 7529 |
m8 := mload(0x100) |
||
| 7530 |
// Selector of `log(bool,string,string,address)`. |
||
| 7531 |
mstore(0x00, 0x97d394d8) |
||
| 7532 |
mstore(0x20, p0) |
||
| 7533 |
mstore(0x40, 0x80) |
||
| 7534 |
mstore(0x60, 0xc0) |
||
| 7535 |
mstore(0x80, p3) |
||
| 7536 |
writeString(0xa0, p1) |
||
| 7537 |
writeString(0xe0, p2) |
||
| 7538 |
} |
||
| 7539 |
_sendLogPayload(0x1c, 0x104); |
||
| 7540 |
assembly {
|
||
| 7541 |
mstore(0x00, m0) |
||
| 7542 |
mstore(0x20, m1) |
||
| 7543 |
mstore(0x40, m2) |
||
| 7544 |
mstore(0x60, m3) |
||
| 7545 |
mstore(0x80, m4) |
||
| 7546 |
mstore(0xa0, m5) |
||
| 7547 |
mstore(0xc0, m6) |
||
| 7548 |
mstore(0xe0, m7) |
||
| 7549 |
mstore(0x100, m8) |
||
| 7550 |
} |
||
| 7551 |
} |
||
| 7552 | |||
| 7553 |
function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {
|
||
| 7554 |
bytes32 m0; |
||
| 7555 |
bytes32 m1; |
||
| 7556 |
bytes32 m2; |
||
| 7557 |
bytes32 m3; |
||
| 7558 |
bytes32 m4; |
||
| 7559 |
bytes32 m5; |
||
| 7560 |
bytes32 m6; |
||
| 7561 |
bytes32 m7; |
||
| 7562 |
bytes32 m8; |
||
| 7563 |
assembly {
|
||
| 7564 |
function writeString(pos, w) {
|
||
| 7565 |
let length := 0 |
||
| 7566 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7567 |
mstore(pos, length) |
||
| 7568 |
let shift := sub(256, shl(3, length)) |
||
| 7569 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7570 |
} |
||
| 7571 |
m0 := mload(0x00) |
||
| 7572 |
m1 := mload(0x20) |
||
| 7573 |
m2 := mload(0x40) |
||
| 7574 |
m3 := mload(0x60) |
||
| 7575 |
m4 := mload(0x80) |
||
| 7576 |
m5 := mload(0xa0) |
||
| 7577 |
m6 := mload(0xc0) |
||
| 7578 |
m7 := mload(0xe0) |
||
| 7579 |
m8 := mload(0x100) |
||
| 7580 |
// Selector of `log(bool,string,string,bool)`. |
||
| 7581 |
mstore(0x00, 0x1e4b87e5) |
||
| 7582 |
mstore(0x20, p0) |
||
| 7583 |
mstore(0x40, 0x80) |
||
| 7584 |
mstore(0x60, 0xc0) |
||
| 7585 |
mstore(0x80, p3) |
||
| 7586 |
writeString(0xa0, p1) |
||
| 7587 |
writeString(0xe0, p2) |
||
| 7588 |
} |
||
| 7589 |
_sendLogPayload(0x1c, 0x104); |
||
| 7590 |
assembly {
|
||
| 7591 |
mstore(0x00, m0) |
||
| 7592 |
mstore(0x20, m1) |
||
| 7593 |
mstore(0x40, m2) |
||
| 7594 |
mstore(0x60, m3) |
||
| 7595 |
mstore(0x80, m4) |
||
| 7596 |
mstore(0xa0, m5) |
||
| 7597 |
mstore(0xc0, m6) |
||
| 7598 |
mstore(0xe0, m7) |
||
| 7599 |
mstore(0x100, m8) |
||
| 7600 |
} |
||
| 7601 |
} |
||
| 7602 | |||
| 7603 |
function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 7604 |
bytes32 m0; |
||
| 7605 |
bytes32 m1; |
||
| 7606 |
bytes32 m2; |
||
| 7607 |
bytes32 m3; |
||
| 7608 |
bytes32 m4; |
||
| 7609 |
bytes32 m5; |
||
| 7610 |
bytes32 m6; |
||
| 7611 |
bytes32 m7; |
||
| 7612 |
bytes32 m8; |
||
| 7613 |
assembly {
|
||
| 7614 |
function writeString(pos, w) {
|
||
| 7615 |
let length := 0 |
||
| 7616 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7617 |
mstore(pos, length) |
||
| 7618 |
let shift := sub(256, shl(3, length)) |
||
| 7619 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7620 |
} |
||
| 7621 |
m0 := mload(0x00) |
||
| 7622 |
m1 := mload(0x20) |
||
| 7623 |
m2 := mload(0x40) |
||
| 7624 |
m3 := mload(0x60) |
||
| 7625 |
m4 := mload(0x80) |
||
| 7626 |
m5 := mload(0xa0) |
||
| 7627 |
m6 := mload(0xc0) |
||
| 7628 |
m7 := mload(0xe0) |
||
| 7629 |
m8 := mload(0x100) |
||
| 7630 |
// Selector of `log(bool,string,string,uint256)`. |
||
| 7631 |
mstore(0x00, 0x7be0c3eb) |
||
| 7632 |
mstore(0x20, p0) |
||
| 7633 |
mstore(0x40, 0x80) |
||
| 7634 |
mstore(0x60, 0xc0) |
||
| 7635 |
mstore(0x80, p3) |
||
| 7636 |
writeString(0xa0, p1) |
||
| 7637 |
writeString(0xe0, p2) |
||
| 7638 |
} |
||
| 7639 |
_sendLogPayload(0x1c, 0x104); |
||
| 7640 |
assembly {
|
||
| 7641 |
mstore(0x00, m0) |
||
| 7642 |
mstore(0x20, m1) |
||
| 7643 |
mstore(0x40, m2) |
||
| 7644 |
mstore(0x60, m3) |
||
| 7645 |
mstore(0x80, m4) |
||
| 7646 |
mstore(0xa0, m5) |
||
| 7647 |
mstore(0xc0, m6) |
||
| 7648 |
mstore(0xe0, m7) |
||
| 7649 |
mstore(0x100, m8) |
||
| 7650 |
} |
||
| 7651 |
} |
||
| 7652 | |||
| 7653 |
function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 7654 |
bytes32 m0; |
||
| 7655 |
bytes32 m1; |
||
| 7656 |
bytes32 m2; |
||
| 7657 |
bytes32 m3; |
||
| 7658 |
bytes32 m4; |
||
| 7659 |
bytes32 m5; |
||
| 7660 |
bytes32 m6; |
||
| 7661 |
bytes32 m7; |
||
| 7662 |
bytes32 m8; |
||
| 7663 |
bytes32 m9; |
||
| 7664 |
bytes32 m10; |
||
| 7665 |
assembly {
|
||
| 7666 |
function writeString(pos, w) {
|
||
| 7667 |
let length := 0 |
||
| 7668 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7669 |
mstore(pos, length) |
||
| 7670 |
let shift := sub(256, shl(3, length)) |
||
| 7671 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7672 |
} |
||
| 7673 |
m0 := mload(0x00) |
||
| 7674 |
m1 := mload(0x20) |
||
| 7675 |
m2 := mload(0x40) |
||
| 7676 |
m3 := mload(0x60) |
||
| 7677 |
m4 := mload(0x80) |
||
| 7678 |
m5 := mload(0xa0) |
||
| 7679 |
m6 := mload(0xc0) |
||
| 7680 |
m7 := mload(0xe0) |
||
| 7681 |
m8 := mload(0x100) |
||
| 7682 |
m9 := mload(0x120) |
||
| 7683 |
m10 := mload(0x140) |
||
| 7684 |
// Selector of `log(bool,string,string,string)`. |
||
| 7685 |
mstore(0x00, 0x1762e32a) |
||
| 7686 |
mstore(0x20, p0) |
||
| 7687 |
mstore(0x40, 0x80) |
||
| 7688 |
mstore(0x60, 0xc0) |
||
| 7689 |
mstore(0x80, 0x100) |
||
| 7690 |
writeString(0xa0, p1) |
||
| 7691 |
writeString(0xe0, p2) |
||
| 7692 |
writeString(0x120, p3) |
||
| 7693 |
} |
||
| 7694 |
_sendLogPayload(0x1c, 0x144); |
||
| 7695 |
assembly {
|
||
| 7696 |
mstore(0x00, m0) |
||
| 7697 |
mstore(0x20, m1) |
||
| 7698 |
mstore(0x40, m2) |
||
| 7699 |
mstore(0x60, m3) |
||
| 7700 |
mstore(0x80, m4) |
||
| 7701 |
mstore(0xa0, m5) |
||
| 7702 |
mstore(0xc0, m6) |
||
| 7703 |
mstore(0xe0, m7) |
||
| 7704 |
mstore(0x100, m8) |
||
| 7705 |
mstore(0x120, m9) |
||
| 7706 |
mstore(0x140, m10) |
||
| 7707 |
} |
||
| 7708 |
} |
||
| 7709 | |||
| 7710 |
function log(uint256 p0, address p1, address p2, address p3) internal pure {
|
||
| 7711 |
bytes32 m0; |
||
| 7712 |
bytes32 m1; |
||
| 7713 |
bytes32 m2; |
||
| 7714 |
bytes32 m3; |
||
| 7715 |
bytes32 m4; |
||
| 7716 |
assembly {
|
||
| 7717 |
m0 := mload(0x00) |
||
| 7718 |
m1 := mload(0x20) |
||
| 7719 |
m2 := mload(0x40) |
||
| 7720 |
m3 := mload(0x60) |
||
| 7721 |
m4 := mload(0x80) |
||
| 7722 |
// Selector of `log(uint256,address,address,address)`. |
||
| 7723 |
mstore(0x00, 0x2488b414) |
||
| 7724 |
mstore(0x20, p0) |
||
| 7725 |
mstore(0x40, p1) |
||
| 7726 |
mstore(0x60, p2) |
||
| 7727 |
mstore(0x80, p3) |
||
| 7728 |
} |
||
| 7729 |
_sendLogPayload(0x1c, 0x84); |
||
| 7730 |
assembly {
|
||
| 7731 |
mstore(0x00, m0) |
||
| 7732 |
mstore(0x20, m1) |
||
| 7733 |
mstore(0x40, m2) |
||
| 7734 |
mstore(0x60, m3) |
||
| 7735 |
mstore(0x80, m4) |
||
| 7736 |
} |
||
| 7737 |
} |
||
| 7738 | |||
| 7739 |
function log(uint256 p0, address p1, address p2, bool p3) internal pure {
|
||
| 7740 |
bytes32 m0; |
||
| 7741 |
bytes32 m1; |
||
| 7742 |
bytes32 m2; |
||
| 7743 |
bytes32 m3; |
||
| 7744 |
bytes32 m4; |
||
| 7745 |
assembly {
|
||
| 7746 |
m0 := mload(0x00) |
||
| 7747 |
m1 := mload(0x20) |
||
| 7748 |
m2 := mload(0x40) |
||
| 7749 |
m3 := mload(0x60) |
||
| 7750 |
m4 := mload(0x80) |
||
| 7751 |
// Selector of `log(uint256,address,address,bool)`. |
||
| 7752 |
mstore(0x00, 0x091ffaf5) |
||
| 7753 |
mstore(0x20, p0) |
||
| 7754 |
mstore(0x40, p1) |
||
| 7755 |
mstore(0x60, p2) |
||
| 7756 |
mstore(0x80, p3) |
||
| 7757 |
} |
||
| 7758 |
_sendLogPayload(0x1c, 0x84); |
||
| 7759 |
assembly {
|
||
| 7760 |
mstore(0x00, m0) |
||
| 7761 |
mstore(0x20, m1) |
||
| 7762 |
mstore(0x40, m2) |
||
| 7763 |
mstore(0x60, m3) |
||
| 7764 |
mstore(0x80, m4) |
||
| 7765 |
} |
||
| 7766 |
} |
||
| 7767 | |||
| 7768 |
function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {
|
||
| 7769 |
bytes32 m0; |
||
| 7770 |
bytes32 m1; |
||
| 7771 |
bytes32 m2; |
||
| 7772 |
bytes32 m3; |
||
| 7773 |
bytes32 m4; |
||
| 7774 |
assembly {
|
||
| 7775 |
m0 := mload(0x00) |
||
| 7776 |
m1 := mload(0x20) |
||
| 7777 |
m2 := mload(0x40) |
||
| 7778 |
m3 := mload(0x60) |
||
| 7779 |
m4 := mload(0x80) |
||
| 7780 |
// Selector of `log(uint256,address,address,uint256)`. |
||
| 7781 |
mstore(0x00, 0x736efbb6) |
||
| 7782 |
mstore(0x20, p0) |
||
| 7783 |
mstore(0x40, p1) |
||
| 7784 |
mstore(0x60, p2) |
||
| 7785 |
mstore(0x80, p3) |
||
| 7786 |
} |
||
| 7787 |
_sendLogPayload(0x1c, 0x84); |
||
| 7788 |
assembly {
|
||
| 7789 |
mstore(0x00, m0) |
||
| 7790 |
mstore(0x20, m1) |
||
| 7791 |
mstore(0x40, m2) |
||
| 7792 |
mstore(0x60, m3) |
||
| 7793 |
mstore(0x80, m4) |
||
| 7794 |
} |
||
| 7795 |
} |
||
| 7796 | |||
| 7797 |
function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {
|
||
| 7798 |
bytes32 m0; |
||
| 7799 |
bytes32 m1; |
||
| 7800 |
bytes32 m2; |
||
| 7801 |
bytes32 m3; |
||
| 7802 |
bytes32 m4; |
||
| 7803 |
bytes32 m5; |
||
| 7804 |
bytes32 m6; |
||
| 7805 |
assembly {
|
||
| 7806 |
function writeString(pos, w) {
|
||
| 7807 |
let length := 0 |
||
| 7808 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7809 |
mstore(pos, length) |
||
| 7810 |
let shift := sub(256, shl(3, length)) |
||
| 7811 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7812 |
} |
||
| 7813 |
m0 := mload(0x00) |
||
| 7814 |
m1 := mload(0x20) |
||
| 7815 |
m2 := mload(0x40) |
||
| 7816 |
m3 := mload(0x60) |
||
| 7817 |
m4 := mload(0x80) |
||
| 7818 |
m5 := mload(0xa0) |
||
| 7819 |
m6 := mload(0xc0) |
||
| 7820 |
// Selector of `log(uint256,address,address,string)`. |
||
| 7821 |
mstore(0x00, 0x031c6f73) |
||
| 7822 |
mstore(0x20, p0) |
||
| 7823 |
mstore(0x40, p1) |
||
| 7824 |
mstore(0x60, p2) |
||
| 7825 |
mstore(0x80, 0x80) |
||
| 7826 |
writeString(0xa0, p3) |
||
| 7827 |
} |
||
| 7828 |
_sendLogPayload(0x1c, 0xc4); |
||
| 7829 |
assembly {
|
||
| 7830 |
mstore(0x00, m0) |
||
| 7831 |
mstore(0x20, m1) |
||
| 7832 |
mstore(0x40, m2) |
||
| 7833 |
mstore(0x60, m3) |
||
| 7834 |
mstore(0x80, m4) |
||
| 7835 |
mstore(0xa0, m5) |
||
| 7836 |
mstore(0xc0, m6) |
||
| 7837 |
} |
||
| 7838 |
} |
||
| 7839 | |||
| 7840 |
function log(uint256 p0, address p1, bool p2, address p3) internal pure {
|
||
| 7841 |
bytes32 m0; |
||
| 7842 |
bytes32 m1; |
||
| 7843 |
bytes32 m2; |
||
| 7844 |
bytes32 m3; |
||
| 7845 |
bytes32 m4; |
||
| 7846 |
assembly {
|
||
| 7847 |
m0 := mload(0x00) |
||
| 7848 |
m1 := mload(0x20) |
||
| 7849 |
m2 := mload(0x40) |
||
| 7850 |
m3 := mload(0x60) |
||
| 7851 |
m4 := mload(0x80) |
||
| 7852 |
// Selector of `log(uint256,address,bool,address)`. |
||
| 7853 |
mstore(0x00, 0xef72c513) |
||
| 7854 |
mstore(0x20, p0) |
||
| 7855 |
mstore(0x40, p1) |
||
| 7856 |
mstore(0x60, p2) |
||
| 7857 |
mstore(0x80, p3) |
||
| 7858 |
} |
||
| 7859 |
_sendLogPayload(0x1c, 0x84); |
||
| 7860 |
assembly {
|
||
| 7861 |
mstore(0x00, m0) |
||
| 7862 |
mstore(0x20, m1) |
||
| 7863 |
mstore(0x40, m2) |
||
| 7864 |
mstore(0x60, m3) |
||
| 7865 |
mstore(0x80, m4) |
||
| 7866 |
} |
||
| 7867 |
} |
||
| 7868 | |||
| 7869 |
function log(uint256 p0, address p1, bool p2, bool p3) internal pure {
|
||
| 7870 |
bytes32 m0; |
||
| 7871 |
bytes32 m1; |
||
| 7872 |
bytes32 m2; |
||
| 7873 |
bytes32 m3; |
||
| 7874 |
bytes32 m4; |
||
| 7875 |
assembly {
|
||
| 7876 |
m0 := mload(0x00) |
||
| 7877 |
m1 := mload(0x20) |
||
| 7878 |
m2 := mload(0x40) |
||
| 7879 |
m3 := mload(0x60) |
||
| 7880 |
m4 := mload(0x80) |
||
| 7881 |
// Selector of `log(uint256,address,bool,bool)`. |
||
| 7882 |
mstore(0x00, 0xe351140f) |
||
| 7883 |
mstore(0x20, p0) |
||
| 7884 |
mstore(0x40, p1) |
||
| 7885 |
mstore(0x60, p2) |
||
| 7886 |
mstore(0x80, p3) |
||
| 7887 |
} |
||
| 7888 |
_sendLogPayload(0x1c, 0x84); |
||
| 7889 |
assembly {
|
||
| 7890 |
mstore(0x00, m0) |
||
| 7891 |
mstore(0x20, m1) |
||
| 7892 |
mstore(0x40, m2) |
||
| 7893 |
mstore(0x60, m3) |
||
| 7894 |
mstore(0x80, m4) |
||
| 7895 |
} |
||
| 7896 |
} |
||
| 7897 | |||
| 7898 |
function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {
|
||
| 7899 |
bytes32 m0; |
||
| 7900 |
bytes32 m1; |
||
| 7901 |
bytes32 m2; |
||
| 7902 |
bytes32 m3; |
||
| 7903 |
bytes32 m4; |
||
| 7904 |
assembly {
|
||
| 7905 |
m0 := mload(0x00) |
||
| 7906 |
m1 := mload(0x20) |
||
| 7907 |
m2 := mload(0x40) |
||
| 7908 |
m3 := mload(0x60) |
||
| 7909 |
m4 := mload(0x80) |
||
| 7910 |
// Selector of `log(uint256,address,bool,uint256)`. |
||
| 7911 |
mstore(0x00, 0x5abd992a) |
||
| 7912 |
mstore(0x20, p0) |
||
| 7913 |
mstore(0x40, p1) |
||
| 7914 |
mstore(0x60, p2) |
||
| 7915 |
mstore(0x80, p3) |
||
| 7916 |
} |
||
| 7917 |
_sendLogPayload(0x1c, 0x84); |
||
| 7918 |
assembly {
|
||
| 7919 |
mstore(0x00, m0) |
||
| 7920 |
mstore(0x20, m1) |
||
| 7921 |
mstore(0x40, m2) |
||
| 7922 |
mstore(0x60, m3) |
||
| 7923 |
mstore(0x80, m4) |
||
| 7924 |
} |
||
| 7925 |
} |
||
| 7926 | |||
| 7927 |
function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {
|
||
| 7928 |
bytes32 m0; |
||
| 7929 |
bytes32 m1; |
||
| 7930 |
bytes32 m2; |
||
| 7931 |
bytes32 m3; |
||
| 7932 |
bytes32 m4; |
||
| 7933 |
bytes32 m5; |
||
| 7934 |
bytes32 m6; |
||
| 7935 |
assembly {
|
||
| 7936 |
function writeString(pos, w) {
|
||
| 7937 |
let length := 0 |
||
| 7938 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 7939 |
mstore(pos, length) |
||
| 7940 |
let shift := sub(256, shl(3, length)) |
||
| 7941 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 7942 |
} |
||
| 7943 |
m0 := mload(0x00) |
||
| 7944 |
m1 := mload(0x20) |
||
| 7945 |
m2 := mload(0x40) |
||
| 7946 |
m3 := mload(0x60) |
||
| 7947 |
m4 := mload(0x80) |
||
| 7948 |
m5 := mload(0xa0) |
||
| 7949 |
m6 := mload(0xc0) |
||
| 7950 |
// Selector of `log(uint256,address,bool,string)`. |
||
| 7951 |
mstore(0x00, 0x90fb06aa) |
||
| 7952 |
mstore(0x20, p0) |
||
| 7953 |
mstore(0x40, p1) |
||
| 7954 |
mstore(0x60, p2) |
||
| 7955 |
mstore(0x80, 0x80) |
||
| 7956 |
writeString(0xa0, p3) |
||
| 7957 |
} |
||
| 7958 |
_sendLogPayload(0x1c, 0xc4); |
||
| 7959 |
assembly {
|
||
| 7960 |
mstore(0x00, m0) |
||
| 7961 |
mstore(0x20, m1) |
||
| 7962 |
mstore(0x40, m2) |
||
| 7963 |
mstore(0x60, m3) |
||
| 7964 |
mstore(0x80, m4) |
||
| 7965 |
mstore(0xa0, m5) |
||
| 7966 |
mstore(0xc0, m6) |
||
| 7967 |
} |
||
| 7968 |
} |
||
| 7969 | |||
| 7970 |
function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {
|
||
| 7971 |
bytes32 m0; |
||
| 7972 |
bytes32 m1; |
||
| 7973 |
bytes32 m2; |
||
| 7974 |
bytes32 m3; |
||
| 7975 |
bytes32 m4; |
||
| 7976 |
assembly {
|
||
| 7977 |
m0 := mload(0x00) |
||
| 7978 |
m1 := mload(0x20) |
||
| 7979 |
m2 := mload(0x40) |
||
| 7980 |
m3 := mload(0x60) |
||
| 7981 |
m4 := mload(0x80) |
||
| 7982 |
// Selector of `log(uint256,address,uint256,address)`. |
||
| 7983 |
mstore(0x00, 0x15c127b5) |
||
| 7984 |
mstore(0x20, p0) |
||
| 7985 |
mstore(0x40, p1) |
||
| 7986 |
mstore(0x60, p2) |
||
| 7987 |
mstore(0x80, p3) |
||
| 7988 |
} |
||
| 7989 |
_sendLogPayload(0x1c, 0x84); |
||
| 7990 |
assembly {
|
||
| 7991 |
mstore(0x00, m0) |
||
| 7992 |
mstore(0x20, m1) |
||
| 7993 |
mstore(0x40, m2) |
||
| 7994 |
mstore(0x60, m3) |
||
| 7995 |
mstore(0x80, m4) |
||
| 7996 |
} |
||
| 7997 |
} |
||
| 7998 | |||
| 7999 |
function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {
|
||
| 8000 |
bytes32 m0; |
||
| 8001 |
bytes32 m1; |
||
| 8002 |
bytes32 m2; |
||
| 8003 |
bytes32 m3; |
||
| 8004 |
bytes32 m4; |
||
| 8005 |
assembly {
|
||
| 8006 |
m0 := mload(0x00) |
||
| 8007 |
m1 := mload(0x20) |
||
| 8008 |
m2 := mload(0x40) |
||
| 8009 |
m3 := mload(0x60) |
||
| 8010 |
m4 := mload(0x80) |
||
| 8011 |
// Selector of `log(uint256,address,uint256,bool)`. |
||
| 8012 |
mstore(0x00, 0x5f743a7c) |
||
| 8013 |
mstore(0x20, p0) |
||
| 8014 |
mstore(0x40, p1) |
||
| 8015 |
mstore(0x60, p2) |
||
| 8016 |
mstore(0x80, p3) |
||
| 8017 |
} |
||
| 8018 |
_sendLogPayload(0x1c, 0x84); |
||
| 8019 |
assembly {
|
||
| 8020 |
mstore(0x00, m0) |
||
| 8021 |
mstore(0x20, m1) |
||
| 8022 |
mstore(0x40, m2) |
||
| 8023 |
mstore(0x60, m3) |
||
| 8024 |
mstore(0x80, m4) |
||
| 8025 |
} |
||
| 8026 |
} |
||
| 8027 | |||
| 8028 |
function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {
|
||
| 8029 |
bytes32 m0; |
||
| 8030 |
bytes32 m1; |
||
| 8031 |
bytes32 m2; |
||
| 8032 |
bytes32 m3; |
||
| 8033 |
bytes32 m4; |
||
| 8034 |
assembly {
|
||
| 8035 |
m0 := mload(0x00) |
||
| 8036 |
m1 := mload(0x20) |
||
| 8037 |
m2 := mload(0x40) |
||
| 8038 |
m3 := mload(0x60) |
||
| 8039 |
m4 := mload(0x80) |
||
| 8040 |
// Selector of `log(uint256,address,uint256,uint256)`. |
||
| 8041 |
mstore(0x00, 0x0c9cd9c1) |
||
| 8042 |
mstore(0x20, p0) |
||
| 8043 |
mstore(0x40, p1) |
||
| 8044 |
mstore(0x60, p2) |
||
| 8045 |
mstore(0x80, p3) |
||
| 8046 |
} |
||
| 8047 |
_sendLogPayload(0x1c, 0x84); |
||
| 8048 |
assembly {
|
||
| 8049 |
mstore(0x00, m0) |
||
| 8050 |
mstore(0x20, m1) |
||
| 8051 |
mstore(0x40, m2) |
||
| 8052 |
mstore(0x60, m3) |
||
| 8053 |
mstore(0x80, m4) |
||
| 8054 |
} |
||
| 8055 |
} |
||
| 8056 | |||
| 8057 |
function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 8058 |
bytes32 m0; |
||
| 8059 |
bytes32 m1; |
||
| 8060 |
bytes32 m2; |
||
| 8061 |
bytes32 m3; |
||
| 8062 |
bytes32 m4; |
||
| 8063 |
bytes32 m5; |
||
| 8064 |
bytes32 m6; |
||
| 8065 |
assembly {
|
||
| 8066 |
function writeString(pos, w) {
|
||
| 8067 |
let length := 0 |
||
| 8068 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8069 |
mstore(pos, length) |
||
| 8070 |
let shift := sub(256, shl(3, length)) |
||
| 8071 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8072 |
} |
||
| 8073 |
m0 := mload(0x00) |
||
| 8074 |
m1 := mload(0x20) |
||
| 8075 |
m2 := mload(0x40) |
||
| 8076 |
m3 := mload(0x60) |
||
| 8077 |
m4 := mload(0x80) |
||
| 8078 |
m5 := mload(0xa0) |
||
| 8079 |
m6 := mload(0xc0) |
||
| 8080 |
// Selector of `log(uint256,address,uint256,string)`. |
||
| 8081 |
mstore(0x00, 0xddb06521) |
||
| 8082 |
mstore(0x20, p0) |
||
| 8083 |
mstore(0x40, p1) |
||
| 8084 |
mstore(0x60, p2) |
||
| 8085 |
mstore(0x80, 0x80) |
||
| 8086 |
writeString(0xa0, p3) |
||
| 8087 |
} |
||
| 8088 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8089 |
assembly {
|
||
| 8090 |
mstore(0x00, m0) |
||
| 8091 |
mstore(0x20, m1) |
||
| 8092 |
mstore(0x40, m2) |
||
| 8093 |
mstore(0x60, m3) |
||
| 8094 |
mstore(0x80, m4) |
||
| 8095 |
mstore(0xa0, m5) |
||
| 8096 |
mstore(0xc0, m6) |
||
| 8097 |
} |
||
| 8098 |
} |
||
| 8099 | |||
| 8100 |
function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {
|
||
| 8101 |
bytes32 m0; |
||
| 8102 |
bytes32 m1; |
||
| 8103 |
bytes32 m2; |
||
| 8104 |
bytes32 m3; |
||
| 8105 |
bytes32 m4; |
||
| 8106 |
bytes32 m5; |
||
| 8107 |
bytes32 m6; |
||
| 8108 |
assembly {
|
||
| 8109 |
function writeString(pos, w) {
|
||
| 8110 |
let length := 0 |
||
| 8111 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8112 |
mstore(pos, length) |
||
| 8113 |
let shift := sub(256, shl(3, length)) |
||
| 8114 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8115 |
} |
||
| 8116 |
m0 := mload(0x00) |
||
| 8117 |
m1 := mload(0x20) |
||
| 8118 |
m2 := mload(0x40) |
||
| 8119 |
m3 := mload(0x60) |
||
| 8120 |
m4 := mload(0x80) |
||
| 8121 |
m5 := mload(0xa0) |
||
| 8122 |
m6 := mload(0xc0) |
||
| 8123 |
// Selector of `log(uint256,address,string,address)`. |
||
| 8124 |
mstore(0x00, 0x9cba8fff) |
||
| 8125 |
mstore(0x20, p0) |
||
| 8126 |
mstore(0x40, p1) |
||
| 8127 |
mstore(0x60, 0x80) |
||
| 8128 |
mstore(0x80, p3) |
||
| 8129 |
writeString(0xa0, p2) |
||
| 8130 |
} |
||
| 8131 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8132 |
assembly {
|
||
| 8133 |
mstore(0x00, m0) |
||
| 8134 |
mstore(0x20, m1) |
||
| 8135 |
mstore(0x40, m2) |
||
| 8136 |
mstore(0x60, m3) |
||
| 8137 |
mstore(0x80, m4) |
||
| 8138 |
mstore(0xa0, m5) |
||
| 8139 |
mstore(0xc0, m6) |
||
| 8140 |
} |
||
| 8141 |
} |
||
| 8142 | |||
| 8143 |
function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {
|
||
| 8144 |
bytes32 m0; |
||
| 8145 |
bytes32 m1; |
||
| 8146 |
bytes32 m2; |
||
| 8147 |
bytes32 m3; |
||
| 8148 |
bytes32 m4; |
||
| 8149 |
bytes32 m5; |
||
| 8150 |
bytes32 m6; |
||
| 8151 |
assembly {
|
||
| 8152 |
function writeString(pos, w) {
|
||
| 8153 |
let length := 0 |
||
| 8154 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8155 |
mstore(pos, length) |
||
| 8156 |
let shift := sub(256, shl(3, length)) |
||
| 8157 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8158 |
} |
||
| 8159 |
m0 := mload(0x00) |
||
| 8160 |
m1 := mload(0x20) |
||
| 8161 |
m2 := mload(0x40) |
||
| 8162 |
m3 := mload(0x60) |
||
| 8163 |
m4 := mload(0x80) |
||
| 8164 |
m5 := mload(0xa0) |
||
| 8165 |
m6 := mload(0xc0) |
||
| 8166 |
// Selector of `log(uint256,address,string,bool)`. |
||
| 8167 |
mstore(0x00, 0xcc32ab07) |
||
| 8168 |
mstore(0x20, p0) |
||
| 8169 |
mstore(0x40, p1) |
||
| 8170 |
mstore(0x60, 0x80) |
||
| 8171 |
mstore(0x80, p3) |
||
| 8172 |
writeString(0xa0, p2) |
||
| 8173 |
} |
||
| 8174 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8175 |
assembly {
|
||
| 8176 |
mstore(0x00, m0) |
||
| 8177 |
mstore(0x20, m1) |
||
| 8178 |
mstore(0x40, m2) |
||
| 8179 |
mstore(0x60, m3) |
||
| 8180 |
mstore(0x80, m4) |
||
| 8181 |
mstore(0xa0, m5) |
||
| 8182 |
mstore(0xc0, m6) |
||
| 8183 |
} |
||
| 8184 |
} |
||
| 8185 | |||
| 8186 |
function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 8187 |
bytes32 m0; |
||
| 8188 |
bytes32 m1; |
||
| 8189 |
bytes32 m2; |
||
| 8190 |
bytes32 m3; |
||
| 8191 |
bytes32 m4; |
||
| 8192 |
bytes32 m5; |
||
| 8193 |
bytes32 m6; |
||
| 8194 |
assembly {
|
||
| 8195 |
function writeString(pos, w) {
|
||
| 8196 |
let length := 0 |
||
| 8197 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8198 |
mstore(pos, length) |
||
| 8199 |
let shift := sub(256, shl(3, length)) |
||
| 8200 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8201 |
} |
||
| 8202 |
m0 := mload(0x00) |
||
| 8203 |
m1 := mload(0x20) |
||
| 8204 |
m2 := mload(0x40) |
||
| 8205 |
m3 := mload(0x60) |
||
| 8206 |
m4 := mload(0x80) |
||
| 8207 |
m5 := mload(0xa0) |
||
| 8208 |
m6 := mload(0xc0) |
||
| 8209 |
// Selector of `log(uint256,address,string,uint256)`. |
||
| 8210 |
mstore(0x00, 0x46826b5d) |
||
| 8211 |
mstore(0x20, p0) |
||
| 8212 |
mstore(0x40, p1) |
||
| 8213 |
mstore(0x60, 0x80) |
||
| 8214 |
mstore(0x80, p3) |
||
| 8215 |
writeString(0xa0, p2) |
||
| 8216 |
} |
||
| 8217 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8218 |
assembly {
|
||
| 8219 |
mstore(0x00, m0) |
||
| 8220 |
mstore(0x20, m1) |
||
| 8221 |
mstore(0x40, m2) |
||
| 8222 |
mstore(0x60, m3) |
||
| 8223 |
mstore(0x80, m4) |
||
| 8224 |
mstore(0xa0, m5) |
||
| 8225 |
mstore(0xc0, m6) |
||
| 8226 |
} |
||
| 8227 |
} |
||
| 8228 | |||
| 8229 |
function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 8230 |
bytes32 m0; |
||
| 8231 |
bytes32 m1; |
||
| 8232 |
bytes32 m2; |
||
| 8233 |
bytes32 m3; |
||
| 8234 |
bytes32 m4; |
||
| 8235 |
bytes32 m5; |
||
| 8236 |
bytes32 m6; |
||
| 8237 |
bytes32 m7; |
||
| 8238 |
bytes32 m8; |
||
| 8239 |
assembly {
|
||
| 8240 |
function writeString(pos, w) {
|
||
| 8241 |
let length := 0 |
||
| 8242 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8243 |
mstore(pos, length) |
||
| 8244 |
let shift := sub(256, shl(3, length)) |
||
| 8245 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8246 |
} |
||
| 8247 |
m0 := mload(0x00) |
||
| 8248 |
m1 := mload(0x20) |
||
| 8249 |
m2 := mload(0x40) |
||
| 8250 |
m3 := mload(0x60) |
||
| 8251 |
m4 := mload(0x80) |
||
| 8252 |
m5 := mload(0xa0) |
||
| 8253 |
m6 := mload(0xc0) |
||
| 8254 |
m7 := mload(0xe0) |
||
| 8255 |
m8 := mload(0x100) |
||
| 8256 |
// Selector of `log(uint256,address,string,string)`. |
||
| 8257 |
mstore(0x00, 0x3e128ca3) |
||
| 8258 |
mstore(0x20, p0) |
||
| 8259 |
mstore(0x40, p1) |
||
| 8260 |
mstore(0x60, 0x80) |
||
| 8261 |
mstore(0x80, 0xc0) |
||
| 8262 |
writeString(0xa0, p2) |
||
| 8263 |
writeString(0xe0, p3) |
||
| 8264 |
} |
||
| 8265 |
_sendLogPayload(0x1c, 0x104); |
||
| 8266 |
assembly {
|
||
| 8267 |
mstore(0x00, m0) |
||
| 8268 |
mstore(0x20, m1) |
||
| 8269 |
mstore(0x40, m2) |
||
| 8270 |
mstore(0x60, m3) |
||
| 8271 |
mstore(0x80, m4) |
||
| 8272 |
mstore(0xa0, m5) |
||
| 8273 |
mstore(0xc0, m6) |
||
| 8274 |
mstore(0xe0, m7) |
||
| 8275 |
mstore(0x100, m8) |
||
| 8276 |
} |
||
| 8277 |
} |
||
| 8278 | |||
| 8279 |
function log(uint256 p0, bool p1, address p2, address p3) internal pure {
|
||
| 8280 |
bytes32 m0; |
||
| 8281 |
bytes32 m1; |
||
| 8282 |
bytes32 m2; |
||
| 8283 |
bytes32 m3; |
||
| 8284 |
bytes32 m4; |
||
| 8285 |
assembly {
|
||
| 8286 |
m0 := mload(0x00) |
||
| 8287 |
m1 := mload(0x20) |
||
| 8288 |
m2 := mload(0x40) |
||
| 8289 |
m3 := mload(0x60) |
||
| 8290 |
m4 := mload(0x80) |
||
| 8291 |
// Selector of `log(uint256,bool,address,address)`. |
||
| 8292 |
mstore(0x00, 0xa1ef4cbb) |
||
| 8293 |
mstore(0x20, p0) |
||
| 8294 |
mstore(0x40, p1) |
||
| 8295 |
mstore(0x60, p2) |
||
| 8296 |
mstore(0x80, p3) |
||
| 8297 |
} |
||
| 8298 |
_sendLogPayload(0x1c, 0x84); |
||
| 8299 |
assembly {
|
||
| 8300 |
mstore(0x00, m0) |
||
| 8301 |
mstore(0x20, m1) |
||
| 8302 |
mstore(0x40, m2) |
||
| 8303 |
mstore(0x60, m3) |
||
| 8304 |
mstore(0x80, m4) |
||
| 8305 |
} |
||
| 8306 |
} |
||
| 8307 | |||
| 8308 |
function log(uint256 p0, bool p1, address p2, bool p3) internal pure {
|
||
| 8309 |
bytes32 m0; |
||
| 8310 |
bytes32 m1; |
||
| 8311 |
bytes32 m2; |
||
| 8312 |
bytes32 m3; |
||
| 8313 |
bytes32 m4; |
||
| 8314 |
assembly {
|
||
| 8315 |
m0 := mload(0x00) |
||
| 8316 |
m1 := mload(0x20) |
||
| 8317 |
m2 := mload(0x40) |
||
| 8318 |
m3 := mload(0x60) |
||
| 8319 |
m4 := mload(0x80) |
||
| 8320 |
// Selector of `log(uint256,bool,address,bool)`. |
||
| 8321 |
mstore(0x00, 0x454d54a5) |
||
| 8322 |
mstore(0x20, p0) |
||
| 8323 |
mstore(0x40, p1) |
||
| 8324 |
mstore(0x60, p2) |
||
| 8325 |
mstore(0x80, p3) |
||
| 8326 |
} |
||
| 8327 |
_sendLogPayload(0x1c, 0x84); |
||
| 8328 |
assembly {
|
||
| 8329 |
mstore(0x00, m0) |
||
| 8330 |
mstore(0x20, m1) |
||
| 8331 |
mstore(0x40, m2) |
||
| 8332 |
mstore(0x60, m3) |
||
| 8333 |
mstore(0x80, m4) |
||
| 8334 |
} |
||
| 8335 |
} |
||
| 8336 | |||
| 8337 |
function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {
|
||
| 8338 |
bytes32 m0; |
||
| 8339 |
bytes32 m1; |
||
| 8340 |
bytes32 m2; |
||
| 8341 |
bytes32 m3; |
||
| 8342 |
bytes32 m4; |
||
| 8343 |
assembly {
|
||
| 8344 |
m0 := mload(0x00) |
||
| 8345 |
m1 := mload(0x20) |
||
| 8346 |
m2 := mload(0x40) |
||
| 8347 |
m3 := mload(0x60) |
||
| 8348 |
m4 := mload(0x80) |
||
| 8349 |
// Selector of `log(uint256,bool,address,uint256)`. |
||
| 8350 |
mstore(0x00, 0x078287f5) |
||
| 8351 |
mstore(0x20, p0) |
||
| 8352 |
mstore(0x40, p1) |
||
| 8353 |
mstore(0x60, p2) |
||
| 8354 |
mstore(0x80, p3) |
||
| 8355 |
} |
||
| 8356 |
_sendLogPayload(0x1c, 0x84); |
||
| 8357 |
assembly {
|
||
| 8358 |
mstore(0x00, m0) |
||
| 8359 |
mstore(0x20, m1) |
||
| 8360 |
mstore(0x40, m2) |
||
| 8361 |
mstore(0x60, m3) |
||
| 8362 |
mstore(0x80, m4) |
||
| 8363 |
} |
||
| 8364 |
} |
||
| 8365 | |||
| 8366 |
function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {
|
||
| 8367 |
bytes32 m0; |
||
| 8368 |
bytes32 m1; |
||
| 8369 |
bytes32 m2; |
||
| 8370 |
bytes32 m3; |
||
| 8371 |
bytes32 m4; |
||
| 8372 |
bytes32 m5; |
||
| 8373 |
bytes32 m6; |
||
| 8374 |
assembly {
|
||
| 8375 |
function writeString(pos, w) {
|
||
| 8376 |
let length := 0 |
||
| 8377 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8378 |
mstore(pos, length) |
||
| 8379 |
let shift := sub(256, shl(3, length)) |
||
| 8380 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8381 |
} |
||
| 8382 |
m0 := mload(0x00) |
||
| 8383 |
m1 := mload(0x20) |
||
| 8384 |
m2 := mload(0x40) |
||
| 8385 |
m3 := mload(0x60) |
||
| 8386 |
m4 := mload(0x80) |
||
| 8387 |
m5 := mload(0xa0) |
||
| 8388 |
m6 := mload(0xc0) |
||
| 8389 |
// Selector of `log(uint256,bool,address,string)`. |
||
| 8390 |
mstore(0x00, 0xade052c7) |
||
| 8391 |
mstore(0x20, p0) |
||
| 8392 |
mstore(0x40, p1) |
||
| 8393 |
mstore(0x60, p2) |
||
| 8394 |
mstore(0x80, 0x80) |
||
| 8395 |
writeString(0xa0, p3) |
||
| 8396 |
} |
||
| 8397 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8398 |
assembly {
|
||
| 8399 |
mstore(0x00, m0) |
||
| 8400 |
mstore(0x20, m1) |
||
| 8401 |
mstore(0x40, m2) |
||
| 8402 |
mstore(0x60, m3) |
||
| 8403 |
mstore(0x80, m4) |
||
| 8404 |
mstore(0xa0, m5) |
||
| 8405 |
mstore(0xc0, m6) |
||
| 8406 |
} |
||
| 8407 |
} |
||
| 8408 | |||
| 8409 |
function log(uint256 p0, bool p1, bool p2, address p3) internal pure {
|
||
| 8410 |
bytes32 m0; |
||
| 8411 |
bytes32 m1; |
||
| 8412 |
bytes32 m2; |
||
| 8413 |
bytes32 m3; |
||
| 8414 |
bytes32 m4; |
||
| 8415 |
assembly {
|
||
| 8416 |
m0 := mload(0x00) |
||
| 8417 |
m1 := mload(0x20) |
||
| 8418 |
m2 := mload(0x40) |
||
| 8419 |
m3 := mload(0x60) |
||
| 8420 |
m4 := mload(0x80) |
||
| 8421 |
// Selector of `log(uint256,bool,bool,address)`. |
||
| 8422 |
mstore(0x00, 0x69640b59) |
||
| 8423 |
mstore(0x20, p0) |
||
| 8424 |
mstore(0x40, p1) |
||
| 8425 |
mstore(0x60, p2) |
||
| 8426 |
mstore(0x80, p3) |
||
| 8427 |
} |
||
| 8428 |
_sendLogPayload(0x1c, 0x84); |
||
| 8429 |
assembly {
|
||
| 8430 |
mstore(0x00, m0) |
||
| 8431 |
mstore(0x20, m1) |
||
| 8432 |
mstore(0x40, m2) |
||
| 8433 |
mstore(0x60, m3) |
||
| 8434 |
mstore(0x80, m4) |
||
| 8435 |
} |
||
| 8436 |
} |
||
| 8437 | |||
| 8438 |
function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {
|
||
| 8439 |
bytes32 m0; |
||
| 8440 |
bytes32 m1; |
||
| 8441 |
bytes32 m2; |
||
| 8442 |
bytes32 m3; |
||
| 8443 |
bytes32 m4; |
||
| 8444 |
assembly {
|
||
| 8445 |
m0 := mload(0x00) |
||
| 8446 |
m1 := mload(0x20) |
||
| 8447 |
m2 := mload(0x40) |
||
| 8448 |
m3 := mload(0x60) |
||
| 8449 |
m4 := mload(0x80) |
||
| 8450 |
// Selector of `log(uint256,bool,bool,bool)`. |
||
| 8451 |
mstore(0x00, 0xb6f577a1) |
||
| 8452 |
mstore(0x20, p0) |
||
| 8453 |
mstore(0x40, p1) |
||
| 8454 |
mstore(0x60, p2) |
||
| 8455 |
mstore(0x80, p3) |
||
| 8456 |
} |
||
| 8457 |
_sendLogPayload(0x1c, 0x84); |
||
| 8458 |
assembly {
|
||
| 8459 |
mstore(0x00, m0) |
||
| 8460 |
mstore(0x20, m1) |
||
| 8461 |
mstore(0x40, m2) |
||
| 8462 |
mstore(0x60, m3) |
||
| 8463 |
mstore(0x80, m4) |
||
| 8464 |
} |
||
| 8465 |
} |
||
| 8466 | |||
| 8467 |
function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {
|
||
| 8468 |
bytes32 m0; |
||
| 8469 |
bytes32 m1; |
||
| 8470 |
bytes32 m2; |
||
| 8471 |
bytes32 m3; |
||
| 8472 |
bytes32 m4; |
||
| 8473 |
assembly {
|
||
| 8474 |
m0 := mload(0x00) |
||
| 8475 |
m1 := mload(0x20) |
||
| 8476 |
m2 := mload(0x40) |
||
| 8477 |
m3 := mload(0x60) |
||
| 8478 |
m4 := mload(0x80) |
||
| 8479 |
// Selector of `log(uint256,bool,bool,uint256)`. |
||
| 8480 |
mstore(0x00, 0x7464ce23) |
||
| 8481 |
mstore(0x20, p0) |
||
| 8482 |
mstore(0x40, p1) |
||
| 8483 |
mstore(0x60, p2) |
||
| 8484 |
mstore(0x80, p3) |
||
| 8485 |
} |
||
| 8486 |
_sendLogPayload(0x1c, 0x84); |
||
| 8487 |
assembly {
|
||
| 8488 |
mstore(0x00, m0) |
||
| 8489 |
mstore(0x20, m1) |
||
| 8490 |
mstore(0x40, m2) |
||
| 8491 |
mstore(0x60, m3) |
||
| 8492 |
mstore(0x80, m4) |
||
| 8493 |
} |
||
| 8494 |
} |
||
| 8495 | |||
| 8496 |
function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {
|
||
| 8497 |
bytes32 m0; |
||
| 8498 |
bytes32 m1; |
||
| 8499 |
bytes32 m2; |
||
| 8500 |
bytes32 m3; |
||
| 8501 |
bytes32 m4; |
||
| 8502 |
bytes32 m5; |
||
| 8503 |
bytes32 m6; |
||
| 8504 |
assembly {
|
||
| 8505 |
function writeString(pos, w) {
|
||
| 8506 |
let length := 0 |
||
| 8507 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8508 |
mstore(pos, length) |
||
| 8509 |
let shift := sub(256, shl(3, length)) |
||
| 8510 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8511 |
} |
||
| 8512 |
m0 := mload(0x00) |
||
| 8513 |
m1 := mload(0x20) |
||
| 8514 |
m2 := mload(0x40) |
||
| 8515 |
m3 := mload(0x60) |
||
| 8516 |
m4 := mload(0x80) |
||
| 8517 |
m5 := mload(0xa0) |
||
| 8518 |
m6 := mload(0xc0) |
||
| 8519 |
// Selector of `log(uint256,bool,bool,string)`. |
||
| 8520 |
mstore(0x00, 0xdddb9561) |
||
| 8521 |
mstore(0x20, p0) |
||
| 8522 |
mstore(0x40, p1) |
||
| 8523 |
mstore(0x60, p2) |
||
| 8524 |
mstore(0x80, 0x80) |
||
| 8525 |
writeString(0xa0, p3) |
||
| 8526 |
} |
||
| 8527 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8528 |
assembly {
|
||
| 8529 |
mstore(0x00, m0) |
||
| 8530 |
mstore(0x20, m1) |
||
| 8531 |
mstore(0x40, m2) |
||
| 8532 |
mstore(0x60, m3) |
||
| 8533 |
mstore(0x80, m4) |
||
| 8534 |
mstore(0xa0, m5) |
||
| 8535 |
mstore(0xc0, m6) |
||
| 8536 |
} |
||
| 8537 |
} |
||
| 8538 | |||
| 8539 |
function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {
|
||
| 8540 |
bytes32 m0; |
||
| 8541 |
bytes32 m1; |
||
| 8542 |
bytes32 m2; |
||
| 8543 |
bytes32 m3; |
||
| 8544 |
bytes32 m4; |
||
| 8545 |
assembly {
|
||
| 8546 |
m0 := mload(0x00) |
||
| 8547 |
m1 := mload(0x20) |
||
| 8548 |
m2 := mload(0x40) |
||
| 8549 |
m3 := mload(0x60) |
||
| 8550 |
m4 := mload(0x80) |
||
| 8551 |
// Selector of `log(uint256,bool,uint256,address)`. |
||
| 8552 |
mstore(0x00, 0x88cb6041) |
||
| 8553 |
mstore(0x20, p0) |
||
| 8554 |
mstore(0x40, p1) |
||
| 8555 |
mstore(0x60, p2) |
||
| 8556 |
mstore(0x80, p3) |
||
| 8557 |
} |
||
| 8558 |
_sendLogPayload(0x1c, 0x84); |
||
| 8559 |
assembly {
|
||
| 8560 |
mstore(0x00, m0) |
||
| 8561 |
mstore(0x20, m1) |
||
| 8562 |
mstore(0x40, m2) |
||
| 8563 |
mstore(0x60, m3) |
||
| 8564 |
mstore(0x80, m4) |
||
| 8565 |
} |
||
| 8566 |
} |
||
| 8567 | |||
| 8568 |
function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {
|
||
| 8569 |
bytes32 m0; |
||
| 8570 |
bytes32 m1; |
||
| 8571 |
bytes32 m2; |
||
| 8572 |
bytes32 m3; |
||
| 8573 |
bytes32 m4; |
||
| 8574 |
assembly {
|
||
| 8575 |
m0 := mload(0x00) |
||
| 8576 |
m1 := mload(0x20) |
||
| 8577 |
m2 := mload(0x40) |
||
| 8578 |
m3 := mload(0x60) |
||
| 8579 |
m4 := mload(0x80) |
||
| 8580 |
// Selector of `log(uint256,bool,uint256,bool)`. |
||
| 8581 |
mstore(0x00, 0x91a02e2a) |
||
| 8582 |
mstore(0x20, p0) |
||
| 8583 |
mstore(0x40, p1) |
||
| 8584 |
mstore(0x60, p2) |
||
| 8585 |
mstore(0x80, p3) |
||
| 8586 |
} |
||
| 8587 |
_sendLogPayload(0x1c, 0x84); |
||
| 8588 |
assembly {
|
||
| 8589 |
mstore(0x00, m0) |
||
| 8590 |
mstore(0x20, m1) |
||
| 8591 |
mstore(0x40, m2) |
||
| 8592 |
mstore(0x60, m3) |
||
| 8593 |
mstore(0x80, m4) |
||
| 8594 |
} |
||
| 8595 |
} |
||
| 8596 | |||
| 8597 |
function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {
|
||
| 8598 |
bytes32 m0; |
||
| 8599 |
bytes32 m1; |
||
| 8600 |
bytes32 m2; |
||
| 8601 |
bytes32 m3; |
||
| 8602 |
bytes32 m4; |
||
| 8603 |
assembly {
|
||
| 8604 |
m0 := mload(0x00) |
||
| 8605 |
m1 := mload(0x20) |
||
| 8606 |
m2 := mload(0x40) |
||
| 8607 |
m3 := mload(0x60) |
||
| 8608 |
m4 := mload(0x80) |
||
| 8609 |
// Selector of `log(uint256,bool,uint256,uint256)`. |
||
| 8610 |
mstore(0x00, 0xc6acc7a8) |
||
| 8611 |
mstore(0x20, p0) |
||
| 8612 |
mstore(0x40, p1) |
||
| 8613 |
mstore(0x60, p2) |
||
| 8614 |
mstore(0x80, p3) |
||
| 8615 |
} |
||
| 8616 |
_sendLogPayload(0x1c, 0x84); |
||
| 8617 |
assembly {
|
||
| 8618 |
mstore(0x00, m0) |
||
| 8619 |
mstore(0x20, m1) |
||
| 8620 |
mstore(0x40, m2) |
||
| 8621 |
mstore(0x60, m3) |
||
| 8622 |
mstore(0x80, m4) |
||
| 8623 |
} |
||
| 8624 |
} |
||
| 8625 | |||
| 8626 |
function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 8627 |
bytes32 m0; |
||
| 8628 |
bytes32 m1; |
||
| 8629 |
bytes32 m2; |
||
| 8630 |
bytes32 m3; |
||
| 8631 |
bytes32 m4; |
||
| 8632 |
bytes32 m5; |
||
| 8633 |
bytes32 m6; |
||
| 8634 |
assembly {
|
||
| 8635 |
function writeString(pos, w) {
|
||
| 8636 |
let length := 0 |
||
| 8637 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8638 |
mstore(pos, length) |
||
| 8639 |
let shift := sub(256, shl(3, length)) |
||
| 8640 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8641 |
} |
||
| 8642 |
m0 := mload(0x00) |
||
| 8643 |
m1 := mload(0x20) |
||
| 8644 |
m2 := mload(0x40) |
||
| 8645 |
m3 := mload(0x60) |
||
| 8646 |
m4 := mload(0x80) |
||
| 8647 |
m5 := mload(0xa0) |
||
| 8648 |
m6 := mload(0xc0) |
||
| 8649 |
// Selector of `log(uint256,bool,uint256,string)`. |
||
| 8650 |
mstore(0x00, 0xde03e774) |
||
| 8651 |
mstore(0x20, p0) |
||
| 8652 |
mstore(0x40, p1) |
||
| 8653 |
mstore(0x60, p2) |
||
| 8654 |
mstore(0x80, 0x80) |
||
| 8655 |
writeString(0xa0, p3) |
||
| 8656 |
} |
||
| 8657 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8658 |
assembly {
|
||
| 8659 |
mstore(0x00, m0) |
||
| 8660 |
mstore(0x20, m1) |
||
| 8661 |
mstore(0x40, m2) |
||
| 8662 |
mstore(0x60, m3) |
||
| 8663 |
mstore(0x80, m4) |
||
| 8664 |
mstore(0xa0, m5) |
||
| 8665 |
mstore(0xc0, m6) |
||
| 8666 |
} |
||
| 8667 |
} |
||
| 8668 | |||
| 8669 |
function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {
|
||
| 8670 |
bytes32 m0; |
||
| 8671 |
bytes32 m1; |
||
| 8672 |
bytes32 m2; |
||
| 8673 |
bytes32 m3; |
||
| 8674 |
bytes32 m4; |
||
| 8675 |
bytes32 m5; |
||
| 8676 |
bytes32 m6; |
||
| 8677 |
assembly {
|
||
| 8678 |
function writeString(pos, w) {
|
||
| 8679 |
let length := 0 |
||
| 8680 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8681 |
mstore(pos, length) |
||
| 8682 |
let shift := sub(256, shl(3, length)) |
||
| 8683 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8684 |
} |
||
| 8685 |
m0 := mload(0x00) |
||
| 8686 |
m1 := mload(0x20) |
||
| 8687 |
m2 := mload(0x40) |
||
| 8688 |
m3 := mload(0x60) |
||
| 8689 |
m4 := mload(0x80) |
||
| 8690 |
m5 := mload(0xa0) |
||
| 8691 |
m6 := mload(0xc0) |
||
| 8692 |
// Selector of `log(uint256,bool,string,address)`. |
||
| 8693 |
mstore(0x00, 0xef529018) |
||
| 8694 |
mstore(0x20, p0) |
||
| 8695 |
mstore(0x40, p1) |
||
| 8696 |
mstore(0x60, 0x80) |
||
| 8697 |
mstore(0x80, p3) |
||
| 8698 |
writeString(0xa0, p2) |
||
| 8699 |
} |
||
| 8700 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8701 |
assembly {
|
||
| 8702 |
mstore(0x00, m0) |
||
| 8703 |
mstore(0x20, m1) |
||
| 8704 |
mstore(0x40, m2) |
||
| 8705 |
mstore(0x60, m3) |
||
| 8706 |
mstore(0x80, m4) |
||
| 8707 |
mstore(0xa0, m5) |
||
| 8708 |
mstore(0xc0, m6) |
||
| 8709 |
} |
||
| 8710 |
} |
||
| 8711 | |||
| 8712 |
function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {
|
||
| 8713 |
bytes32 m0; |
||
| 8714 |
bytes32 m1; |
||
| 8715 |
bytes32 m2; |
||
| 8716 |
bytes32 m3; |
||
| 8717 |
bytes32 m4; |
||
| 8718 |
bytes32 m5; |
||
| 8719 |
bytes32 m6; |
||
| 8720 |
assembly {
|
||
| 8721 |
function writeString(pos, w) {
|
||
| 8722 |
let length := 0 |
||
| 8723 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8724 |
mstore(pos, length) |
||
| 8725 |
let shift := sub(256, shl(3, length)) |
||
| 8726 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8727 |
} |
||
| 8728 |
m0 := mload(0x00) |
||
| 8729 |
m1 := mload(0x20) |
||
| 8730 |
m2 := mload(0x40) |
||
| 8731 |
m3 := mload(0x60) |
||
| 8732 |
m4 := mload(0x80) |
||
| 8733 |
m5 := mload(0xa0) |
||
| 8734 |
m6 := mload(0xc0) |
||
| 8735 |
// Selector of `log(uint256,bool,string,bool)`. |
||
| 8736 |
mstore(0x00, 0xeb928d7f) |
||
| 8737 |
mstore(0x20, p0) |
||
| 8738 |
mstore(0x40, p1) |
||
| 8739 |
mstore(0x60, 0x80) |
||
| 8740 |
mstore(0x80, p3) |
||
| 8741 |
writeString(0xa0, p2) |
||
| 8742 |
} |
||
| 8743 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8744 |
assembly {
|
||
| 8745 |
mstore(0x00, m0) |
||
| 8746 |
mstore(0x20, m1) |
||
| 8747 |
mstore(0x40, m2) |
||
| 8748 |
mstore(0x60, m3) |
||
| 8749 |
mstore(0x80, m4) |
||
| 8750 |
mstore(0xa0, m5) |
||
| 8751 |
mstore(0xc0, m6) |
||
| 8752 |
} |
||
| 8753 |
} |
||
| 8754 | |||
| 8755 |
function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 8756 |
bytes32 m0; |
||
| 8757 |
bytes32 m1; |
||
| 8758 |
bytes32 m2; |
||
| 8759 |
bytes32 m3; |
||
| 8760 |
bytes32 m4; |
||
| 8761 |
bytes32 m5; |
||
| 8762 |
bytes32 m6; |
||
| 8763 |
assembly {
|
||
| 8764 |
function writeString(pos, w) {
|
||
| 8765 |
let length := 0 |
||
| 8766 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8767 |
mstore(pos, length) |
||
| 8768 |
let shift := sub(256, shl(3, length)) |
||
| 8769 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8770 |
} |
||
| 8771 |
m0 := mload(0x00) |
||
| 8772 |
m1 := mload(0x20) |
||
| 8773 |
m2 := mload(0x40) |
||
| 8774 |
m3 := mload(0x60) |
||
| 8775 |
m4 := mload(0x80) |
||
| 8776 |
m5 := mload(0xa0) |
||
| 8777 |
m6 := mload(0xc0) |
||
| 8778 |
// Selector of `log(uint256,bool,string,uint256)`. |
||
| 8779 |
mstore(0x00, 0x2c1d0746) |
||
| 8780 |
mstore(0x20, p0) |
||
| 8781 |
mstore(0x40, p1) |
||
| 8782 |
mstore(0x60, 0x80) |
||
| 8783 |
mstore(0x80, p3) |
||
| 8784 |
writeString(0xa0, p2) |
||
| 8785 |
} |
||
| 8786 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8787 |
assembly {
|
||
| 8788 |
mstore(0x00, m0) |
||
| 8789 |
mstore(0x20, m1) |
||
| 8790 |
mstore(0x40, m2) |
||
| 8791 |
mstore(0x60, m3) |
||
| 8792 |
mstore(0x80, m4) |
||
| 8793 |
mstore(0xa0, m5) |
||
| 8794 |
mstore(0xc0, m6) |
||
| 8795 |
} |
||
| 8796 |
} |
||
| 8797 | |||
| 8798 |
function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 8799 |
bytes32 m0; |
||
| 8800 |
bytes32 m1; |
||
| 8801 |
bytes32 m2; |
||
| 8802 |
bytes32 m3; |
||
| 8803 |
bytes32 m4; |
||
| 8804 |
bytes32 m5; |
||
| 8805 |
bytes32 m6; |
||
| 8806 |
bytes32 m7; |
||
| 8807 |
bytes32 m8; |
||
| 8808 |
assembly {
|
||
| 8809 |
function writeString(pos, w) {
|
||
| 8810 |
let length := 0 |
||
| 8811 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8812 |
mstore(pos, length) |
||
| 8813 |
let shift := sub(256, shl(3, length)) |
||
| 8814 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8815 |
} |
||
| 8816 |
m0 := mload(0x00) |
||
| 8817 |
m1 := mload(0x20) |
||
| 8818 |
m2 := mload(0x40) |
||
| 8819 |
m3 := mload(0x60) |
||
| 8820 |
m4 := mload(0x80) |
||
| 8821 |
m5 := mload(0xa0) |
||
| 8822 |
m6 := mload(0xc0) |
||
| 8823 |
m7 := mload(0xe0) |
||
| 8824 |
m8 := mload(0x100) |
||
| 8825 |
// Selector of `log(uint256,bool,string,string)`. |
||
| 8826 |
mstore(0x00, 0x68c8b8bd) |
||
| 8827 |
mstore(0x20, p0) |
||
| 8828 |
mstore(0x40, p1) |
||
| 8829 |
mstore(0x60, 0x80) |
||
| 8830 |
mstore(0x80, 0xc0) |
||
| 8831 |
writeString(0xa0, p2) |
||
| 8832 |
writeString(0xe0, p3) |
||
| 8833 |
} |
||
| 8834 |
_sendLogPayload(0x1c, 0x104); |
||
| 8835 |
assembly {
|
||
| 8836 |
mstore(0x00, m0) |
||
| 8837 |
mstore(0x20, m1) |
||
| 8838 |
mstore(0x40, m2) |
||
| 8839 |
mstore(0x60, m3) |
||
| 8840 |
mstore(0x80, m4) |
||
| 8841 |
mstore(0xa0, m5) |
||
| 8842 |
mstore(0xc0, m6) |
||
| 8843 |
mstore(0xe0, m7) |
||
| 8844 |
mstore(0x100, m8) |
||
| 8845 |
} |
||
| 8846 |
} |
||
| 8847 | |||
| 8848 |
function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {
|
||
| 8849 |
bytes32 m0; |
||
| 8850 |
bytes32 m1; |
||
| 8851 |
bytes32 m2; |
||
| 8852 |
bytes32 m3; |
||
| 8853 |
bytes32 m4; |
||
| 8854 |
assembly {
|
||
| 8855 |
m0 := mload(0x00) |
||
| 8856 |
m1 := mload(0x20) |
||
| 8857 |
m2 := mload(0x40) |
||
| 8858 |
m3 := mload(0x60) |
||
| 8859 |
m4 := mload(0x80) |
||
| 8860 |
// Selector of `log(uint256,uint256,address,address)`. |
||
| 8861 |
mstore(0x00, 0x56a5d1b1) |
||
| 8862 |
mstore(0x20, p0) |
||
| 8863 |
mstore(0x40, p1) |
||
| 8864 |
mstore(0x60, p2) |
||
| 8865 |
mstore(0x80, p3) |
||
| 8866 |
} |
||
| 8867 |
_sendLogPayload(0x1c, 0x84); |
||
| 8868 |
assembly {
|
||
| 8869 |
mstore(0x00, m0) |
||
| 8870 |
mstore(0x20, m1) |
||
| 8871 |
mstore(0x40, m2) |
||
| 8872 |
mstore(0x60, m3) |
||
| 8873 |
mstore(0x80, m4) |
||
| 8874 |
} |
||
| 8875 |
} |
||
| 8876 | |||
| 8877 |
function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {
|
||
| 8878 |
bytes32 m0; |
||
| 8879 |
bytes32 m1; |
||
| 8880 |
bytes32 m2; |
||
| 8881 |
bytes32 m3; |
||
| 8882 |
bytes32 m4; |
||
| 8883 |
assembly {
|
||
| 8884 |
m0 := mload(0x00) |
||
| 8885 |
m1 := mload(0x20) |
||
| 8886 |
m2 := mload(0x40) |
||
| 8887 |
m3 := mload(0x60) |
||
| 8888 |
m4 := mload(0x80) |
||
| 8889 |
// Selector of `log(uint256,uint256,address,bool)`. |
||
| 8890 |
mstore(0x00, 0x15cac476) |
||
| 8891 |
mstore(0x20, p0) |
||
| 8892 |
mstore(0x40, p1) |
||
| 8893 |
mstore(0x60, p2) |
||
| 8894 |
mstore(0x80, p3) |
||
| 8895 |
} |
||
| 8896 |
_sendLogPayload(0x1c, 0x84); |
||
| 8897 |
assembly {
|
||
| 8898 |
mstore(0x00, m0) |
||
| 8899 |
mstore(0x20, m1) |
||
| 8900 |
mstore(0x40, m2) |
||
| 8901 |
mstore(0x60, m3) |
||
| 8902 |
mstore(0x80, m4) |
||
| 8903 |
} |
||
| 8904 |
} |
||
| 8905 | |||
| 8906 |
function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {
|
||
| 8907 |
bytes32 m0; |
||
| 8908 |
bytes32 m1; |
||
| 8909 |
bytes32 m2; |
||
| 8910 |
bytes32 m3; |
||
| 8911 |
bytes32 m4; |
||
| 8912 |
assembly {
|
||
| 8913 |
m0 := mload(0x00) |
||
| 8914 |
m1 := mload(0x20) |
||
| 8915 |
m2 := mload(0x40) |
||
| 8916 |
m3 := mload(0x60) |
||
| 8917 |
m4 := mload(0x80) |
||
| 8918 |
// Selector of `log(uint256,uint256,address,uint256)`. |
||
| 8919 |
mstore(0x00, 0x88f6e4b2) |
||
| 8920 |
mstore(0x20, p0) |
||
| 8921 |
mstore(0x40, p1) |
||
| 8922 |
mstore(0x60, p2) |
||
| 8923 |
mstore(0x80, p3) |
||
| 8924 |
} |
||
| 8925 |
_sendLogPayload(0x1c, 0x84); |
||
| 8926 |
assembly {
|
||
| 8927 |
mstore(0x00, m0) |
||
| 8928 |
mstore(0x20, m1) |
||
| 8929 |
mstore(0x40, m2) |
||
| 8930 |
mstore(0x60, m3) |
||
| 8931 |
mstore(0x80, m4) |
||
| 8932 |
} |
||
| 8933 |
} |
||
| 8934 | |||
| 8935 |
function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {
|
||
| 8936 |
bytes32 m0; |
||
| 8937 |
bytes32 m1; |
||
| 8938 |
bytes32 m2; |
||
| 8939 |
bytes32 m3; |
||
| 8940 |
bytes32 m4; |
||
| 8941 |
bytes32 m5; |
||
| 8942 |
bytes32 m6; |
||
| 8943 |
assembly {
|
||
| 8944 |
function writeString(pos, w) {
|
||
| 8945 |
let length := 0 |
||
| 8946 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 8947 |
mstore(pos, length) |
||
| 8948 |
let shift := sub(256, shl(3, length)) |
||
| 8949 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 8950 |
} |
||
| 8951 |
m0 := mload(0x00) |
||
| 8952 |
m1 := mload(0x20) |
||
| 8953 |
m2 := mload(0x40) |
||
| 8954 |
m3 := mload(0x60) |
||
| 8955 |
m4 := mload(0x80) |
||
| 8956 |
m5 := mload(0xa0) |
||
| 8957 |
m6 := mload(0xc0) |
||
| 8958 |
// Selector of `log(uint256,uint256,address,string)`. |
||
| 8959 |
mstore(0x00, 0x6cde40b8) |
||
| 8960 |
mstore(0x20, p0) |
||
| 8961 |
mstore(0x40, p1) |
||
| 8962 |
mstore(0x60, p2) |
||
| 8963 |
mstore(0x80, 0x80) |
||
| 8964 |
writeString(0xa0, p3) |
||
| 8965 |
} |
||
| 8966 |
_sendLogPayload(0x1c, 0xc4); |
||
| 8967 |
assembly {
|
||
| 8968 |
mstore(0x00, m0) |
||
| 8969 |
mstore(0x20, m1) |
||
| 8970 |
mstore(0x40, m2) |
||
| 8971 |
mstore(0x60, m3) |
||
| 8972 |
mstore(0x80, m4) |
||
| 8973 |
mstore(0xa0, m5) |
||
| 8974 |
mstore(0xc0, m6) |
||
| 8975 |
} |
||
| 8976 |
} |
||
| 8977 | |||
| 8978 |
function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {
|
||
| 8979 |
bytes32 m0; |
||
| 8980 |
bytes32 m1; |
||
| 8981 |
bytes32 m2; |
||
| 8982 |
bytes32 m3; |
||
| 8983 |
bytes32 m4; |
||
| 8984 |
assembly {
|
||
| 8985 |
m0 := mload(0x00) |
||
| 8986 |
m1 := mload(0x20) |
||
| 8987 |
m2 := mload(0x40) |
||
| 8988 |
m3 := mload(0x60) |
||
| 8989 |
m4 := mload(0x80) |
||
| 8990 |
// Selector of `log(uint256,uint256,bool,address)`. |
||
| 8991 |
mstore(0x00, 0x9a816a83) |
||
| 8992 |
mstore(0x20, p0) |
||
| 8993 |
mstore(0x40, p1) |
||
| 8994 |
mstore(0x60, p2) |
||
| 8995 |
mstore(0x80, p3) |
||
| 8996 |
} |
||
| 8997 |
_sendLogPayload(0x1c, 0x84); |
||
| 8998 |
assembly {
|
||
| 8999 |
mstore(0x00, m0) |
||
| 9000 |
mstore(0x20, m1) |
||
| 9001 |
mstore(0x40, m2) |
||
| 9002 |
mstore(0x60, m3) |
||
| 9003 |
mstore(0x80, m4) |
||
| 9004 |
} |
||
| 9005 |
} |
||
| 9006 | |||
| 9007 |
function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {
|
||
| 9008 |
bytes32 m0; |
||
| 9009 |
bytes32 m1; |
||
| 9010 |
bytes32 m2; |
||
| 9011 |
bytes32 m3; |
||
| 9012 |
bytes32 m4; |
||
| 9013 |
assembly {
|
||
| 9014 |
m0 := mload(0x00) |
||
| 9015 |
m1 := mload(0x20) |
||
| 9016 |
m2 := mload(0x40) |
||
| 9017 |
m3 := mload(0x60) |
||
| 9018 |
m4 := mload(0x80) |
||
| 9019 |
// Selector of `log(uint256,uint256,bool,bool)`. |
||
| 9020 |
mstore(0x00, 0xab085ae6) |
||
| 9021 |
mstore(0x20, p0) |
||
| 9022 |
mstore(0x40, p1) |
||
| 9023 |
mstore(0x60, p2) |
||
| 9024 |
mstore(0x80, p3) |
||
| 9025 |
} |
||
| 9026 |
_sendLogPayload(0x1c, 0x84); |
||
| 9027 |
assembly {
|
||
| 9028 |
mstore(0x00, m0) |
||
| 9029 |
mstore(0x20, m1) |
||
| 9030 |
mstore(0x40, m2) |
||
| 9031 |
mstore(0x60, m3) |
||
| 9032 |
mstore(0x80, m4) |
||
| 9033 |
} |
||
| 9034 |
} |
||
| 9035 | |||
| 9036 |
function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {
|
||
| 9037 |
bytes32 m0; |
||
| 9038 |
bytes32 m1; |
||
| 9039 |
bytes32 m2; |
||
| 9040 |
bytes32 m3; |
||
| 9041 |
bytes32 m4; |
||
| 9042 |
assembly {
|
||
| 9043 |
m0 := mload(0x00) |
||
| 9044 |
m1 := mload(0x20) |
||
| 9045 |
m2 := mload(0x40) |
||
| 9046 |
m3 := mload(0x60) |
||
| 9047 |
m4 := mload(0x80) |
||
| 9048 |
// Selector of `log(uint256,uint256,bool,uint256)`. |
||
| 9049 |
mstore(0x00, 0xeb7f6fd2) |
||
| 9050 |
mstore(0x20, p0) |
||
| 9051 |
mstore(0x40, p1) |
||
| 9052 |
mstore(0x60, p2) |
||
| 9053 |
mstore(0x80, p3) |
||
| 9054 |
} |
||
| 9055 |
_sendLogPayload(0x1c, 0x84); |
||
| 9056 |
assembly {
|
||
| 9057 |
mstore(0x00, m0) |
||
| 9058 |
mstore(0x20, m1) |
||
| 9059 |
mstore(0x40, m2) |
||
| 9060 |
mstore(0x60, m3) |
||
| 9061 |
mstore(0x80, m4) |
||
| 9062 |
} |
||
| 9063 |
} |
||
| 9064 | |||
| 9065 |
function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {
|
||
| 9066 |
bytes32 m0; |
||
| 9067 |
bytes32 m1; |
||
| 9068 |
bytes32 m2; |
||
| 9069 |
bytes32 m3; |
||
| 9070 |
bytes32 m4; |
||
| 9071 |
bytes32 m5; |
||
| 9072 |
bytes32 m6; |
||
| 9073 |
assembly {
|
||
| 9074 |
function writeString(pos, w) {
|
||
| 9075 |
let length := 0 |
||
| 9076 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9077 |
mstore(pos, length) |
||
| 9078 |
let shift := sub(256, shl(3, length)) |
||
| 9079 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9080 |
} |
||
| 9081 |
m0 := mload(0x00) |
||
| 9082 |
m1 := mload(0x20) |
||
| 9083 |
m2 := mload(0x40) |
||
| 9084 |
m3 := mload(0x60) |
||
| 9085 |
m4 := mload(0x80) |
||
| 9086 |
m5 := mload(0xa0) |
||
| 9087 |
m6 := mload(0xc0) |
||
| 9088 |
// Selector of `log(uint256,uint256,bool,string)`. |
||
| 9089 |
mstore(0x00, 0xa5b4fc99) |
||
| 9090 |
mstore(0x20, p0) |
||
| 9091 |
mstore(0x40, p1) |
||
| 9092 |
mstore(0x60, p2) |
||
| 9093 |
mstore(0x80, 0x80) |
||
| 9094 |
writeString(0xa0, p3) |
||
| 9095 |
} |
||
| 9096 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9097 |
assembly {
|
||
| 9098 |
mstore(0x00, m0) |
||
| 9099 |
mstore(0x20, m1) |
||
| 9100 |
mstore(0x40, m2) |
||
| 9101 |
mstore(0x60, m3) |
||
| 9102 |
mstore(0x80, m4) |
||
| 9103 |
mstore(0xa0, m5) |
||
| 9104 |
mstore(0xc0, m6) |
||
| 9105 |
} |
||
| 9106 |
} |
||
| 9107 | |||
| 9108 |
function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {
|
||
| 9109 |
bytes32 m0; |
||
| 9110 |
bytes32 m1; |
||
| 9111 |
bytes32 m2; |
||
| 9112 |
bytes32 m3; |
||
| 9113 |
bytes32 m4; |
||
| 9114 |
assembly {
|
||
| 9115 |
m0 := mload(0x00) |
||
| 9116 |
m1 := mload(0x20) |
||
| 9117 |
m2 := mload(0x40) |
||
| 9118 |
m3 := mload(0x60) |
||
| 9119 |
m4 := mload(0x80) |
||
| 9120 |
// Selector of `log(uint256,uint256,uint256,address)`. |
||
| 9121 |
mstore(0x00, 0xfa8185af) |
||
| 9122 |
mstore(0x20, p0) |
||
| 9123 |
mstore(0x40, p1) |
||
| 9124 |
mstore(0x60, p2) |
||
| 9125 |
mstore(0x80, p3) |
||
| 9126 |
} |
||
| 9127 |
_sendLogPayload(0x1c, 0x84); |
||
| 9128 |
assembly {
|
||
| 9129 |
mstore(0x00, m0) |
||
| 9130 |
mstore(0x20, m1) |
||
| 9131 |
mstore(0x40, m2) |
||
| 9132 |
mstore(0x60, m3) |
||
| 9133 |
mstore(0x80, m4) |
||
| 9134 |
} |
||
| 9135 |
} |
||
| 9136 | |||
| 9137 |
function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {
|
||
| 9138 |
bytes32 m0; |
||
| 9139 |
bytes32 m1; |
||
| 9140 |
bytes32 m2; |
||
| 9141 |
bytes32 m3; |
||
| 9142 |
bytes32 m4; |
||
| 9143 |
assembly {
|
||
| 9144 |
m0 := mload(0x00) |
||
| 9145 |
m1 := mload(0x20) |
||
| 9146 |
m2 := mload(0x40) |
||
| 9147 |
m3 := mload(0x60) |
||
| 9148 |
m4 := mload(0x80) |
||
| 9149 |
// Selector of `log(uint256,uint256,uint256,bool)`. |
||
| 9150 |
mstore(0x00, 0xc598d185) |
||
| 9151 |
mstore(0x20, p0) |
||
| 9152 |
mstore(0x40, p1) |
||
| 9153 |
mstore(0x60, p2) |
||
| 9154 |
mstore(0x80, p3) |
||
| 9155 |
} |
||
| 9156 |
_sendLogPayload(0x1c, 0x84); |
||
| 9157 |
assembly {
|
||
| 9158 |
mstore(0x00, m0) |
||
| 9159 |
mstore(0x20, m1) |
||
| 9160 |
mstore(0x40, m2) |
||
| 9161 |
mstore(0x60, m3) |
||
| 9162 |
mstore(0x80, m4) |
||
| 9163 |
} |
||
| 9164 |
} |
||
| 9165 | |||
| 9166 |
function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 9167 |
bytes32 m0; |
||
| 9168 |
bytes32 m1; |
||
| 9169 |
bytes32 m2; |
||
| 9170 |
bytes32 m3; |
||
| 9171 |
bytes32 m4; |
||
| 9172 |
assembly {
|
||
| 9173 |
m0 := mload(0x00) |
||
| 9174 |
m1 := mload(0x20) |
||
| 9175 |
m2 := mload(0x40) |
||
| 9176 |
m3 := mload(0x60) |
||
| 9177 |
m4 := mload(0x80) |
||
| 9178 |
// Selector of `log(uint256,uint256,uint256,uint256)`. |
||
| 9179 |
mstore(0x00, 0x193fb800) |
||
| 9180 |
mstore(0x20, p0) |
||
| 9181 |
mstore(0x40, p1) |
||
| 9182 |
mstore(0x60, p2) |
||
| 9183 |
mstore(0x80, p3) |
||
| 9184 |
} |
||
| 9185 |
_sendLogPayload(0x1c, 0x84); |
||
| 9186 |
assembly {
|
||
| 9187 |
mstore(0x00, m0) |
||
| 9188 |
mstore(0x20, m1) |
||
| 9189 |
mstore(0x40, m2) |
||
| 9190 |
mstore(0x60, m3) |
||
| 9191 |
mstore(0x80, m4) |
||
| 9192 |
} |
||
| 9193 |
} |
||
| 9194 | |||
| 9195 |
function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 9196 |
bytes32 m0; |
||
| 9197 |
bytes32 m1; |
||
| 9198 |
bytes32 m2; |
||
| 9199 |
bytes32 m3; |
||
| 9200 |
bytes32 m4; |
||
| 9201 |
bytes32 m5; |
||
| 9202 |
bytes32 m6; |
||
| 9203 |
assembly {
|
||
| 9204 |
function writeString(pos, w) {
|
||
| 9205 |
let length := 0 |
||
| 9206 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9207 |
mstore(pos, length) |
||
| 9208 |
let shift := sub(256, shl(3, length)) |
||
| 9209 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9210 |
} |
||
| 9211 |
m0 := mload(0x00) |
||
| 9212 |
m1 := mload(0x20) |
||
| 9213 |
m2 := mload(0x40) |
||
| 9214 |
m3 := mload(0x60) |
||
| 9215 |
m4 := mload(0x80) |
||
| 9216 |
m5 := mload(0xa0) |
||
| 9217 |
m6 := mload(0xc0) |
||
| 9218 |
// Selector of `log(uint256,uint256,uint256,string)`. |
||
| 9219 |
mstore(0x00, 0x59cfcbe3) |
||
| 9220 |
mstore(0x20, p0) |
||
| 9221 |
mstore(0x40, p1) |
||
| 9222 |
mstore(0x60, p2) |
||
| 9223 |
mstore(0x80, 0x80) |
||
| 9224 |
writeString(0xa0, p3) |
||
| 9225 |
} |
||
| 9226 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9227 |
assembly {
|
||
| 9228 |
mstore(0x00, m0) |
||
| 9229 |
mstore(0x20, m1) |
||
| 9230 |
mstore(0x40, m2) |
||
| 9231 |
mstore(0x60, m3) |
||
| 9232 |
mstore(0x80, m4) |
||
| 9233 |
mstore(0xa0, m5) |
||
| 9234 |
mstore(0xc0, m6) |
||
| 9235 |
} |
||
| 9236 |
} |
||
| 9237 | |||
| 9238 |
function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {
|
||
| 9239 |
bytes32 m0; |
||
| 9240 |
bytes32 m1; |
||
| 9241 |
bytes32 m2; |
||
| 9242 |
bytes32 m3; |
||
| 9243 |
bytes32 m4; |
||
| 9244 |
bytes32 m5; |
||
| 9245 |
bytes32 m6; |
||
| 9246 |
assembly {
|
||
| 9247 |
function writeString(pos, w) {
|
||
| 9248 |
let length := 0 |
||
| 9249 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9250 |
mstore(pos, length) |
||
| 9251 |
let shift := sub(256, shl(3, length)) |
||
| 9252 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9253 |
} |
||
| 9254 |
m0 := mload(0x00) |
||
| 9255 |
m1 := mload(0x20) |
||
| 9256 |
m2 := mload(0x40) |
||
| 9257 |
m3 := mload(0x60) |
||
| 9258 |
m4 := mload(0x80) |
||
| 9259 |
m5 := mload(0xa0) |
||
| 9260 |
m6 := mload(0xc0) |
||
| 9261 |
// Selector of `log(uint256,uint256,string,address)`. |
||
| 9262 |
mstore(0x00, 0x42d21db7) |
||
| 9263 |
mstore(0x20, p0) |
||
| 9264 |
mstore(0x40, p1) |
||
| 9265 |
mstore(0x60, 0x80) |
||
| 9266 |
mstore(0x80, p3) |
||
| 9267 |
writeString(0xa0, p2) |
||
| 9268 |
} |
||
| 9269 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9270 |
assembly {
|
||
| 9271 |
mstore(0x00, m0) |
||
| 9272 |
mstore(0x20, m1) |
||
| 9273 |
mstore(0x40, m2) |
||
| 9274 |
mstore(0x60, m3) |
||
| 9275 |
mstore(0x80, m4) |
||
| 9276 |
mstore(0xa0, m5) |
||
| 9277 |
mstore(0xc0, m6) |
||
| 9278 |
} |
||
| 9279 |
} |
||
| 9280 | |||
| 9281 |
function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {
|
||
| 9282 |
bytes32 m0; |
||
| 9283 |
bytes32 m1; |
||
| 9284 |
bytes32 m2; |
||
| 9285 |
bytes32 m3; |
||
| 9286 |
bytes32 m4; |
||
| 9287 |
bytes32 m5; |
||
| 9288 |
bytes32 m6; |
||
| 9289 |
assembly {
|
||
| 9290 |
function writeString(pos, w) {
|
||
| 9291 |
let length := 0 |
||
| 9292 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9293 |
mstore(pos, length) |
||
| 9294 |
let shift := sub(256, shl(3, length)) |
||
| 9295 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9296 |
} |
||
| 9297 |
m0 := mload(0x00) |
||
| 9298 |
m1 := mload(0x20) |
||
| 9299 |
m2 := mload(0x40) |
||
| 9300 |
m3 := mload(0x60) |
||
| 9301 |
m4 := mload(0x80) |
||
| 9302 |
m5 := mload(0xa0) |
||
| 9303 |
m6 := mload(0xc0) |
||
| 9304 |
// Selector of `log(uint256,uint256,string,bool)`. |
||
| 9305 |
mstore(0x00, 0x7af6ab25) |
||
| 9306 |
mstore(0x20, p0) |
||
| 9307 |
mstore(0x40, p1) |
||
| 9308 |
mstore(0x60, 0x80) |
||
| 9309 |
mstore(0x80, p3) |
||
| 9310 |
writeString(0xa0, p2) |
||
| 9311 |
} |
||
| 9312 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9313 |
assembly {
|
||
| 9314 |
mstore(0x00, m0) |
||
| 9315 |
mstore(0x20, m1) |
||
| 9316 |
mstore(0x40, m2) |
||
| 9317 |
mstore(0x60, m3) |
||
| 9318 |
mstore(0x80, m4) |
||
| 9319 |
mstore(0xa0, m5) |
||
| 9320 |
mstore(0xc0, m6) |
||
| 9321 |
} |
||
| 9322 |
} |
||
| 9323 | |||
| 9324 |
function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 9325 |
bytes32 m0; |
||
| 9326 |
bytes32 m1; |
||
| 9327 |
bytes32 m2; |
||
| 9328 |
bytes32 m3; |
||
| 9329 |
bytes32 m4; |
||
| 9330 |
bytes32 m5; |
||
| 9331 |
bytes32 m6; |
||
| 9332 |
assembly {
|
||
| 9333 |
function writeString(pos, w) {
|
||
| 9334 |
let length := 0 |
||
| 9335 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9336 |
mstore(pos, length) |
||
| 9337 |
let shift := sub(256, shl(3, length)) |
||
| 9338 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9339 |
} |
||
| 9340 |
m0 := mload(0x00) |
||
| 9341 |
m1 := mload(0x20) |
||
| 9342 |
m2 := mload(0x40) |
||
| 9343 |
m3 := mload(0x60) |
||
| 9344 |
m4 := mload(0x80) |
||
| 9345 |
m5 := mload(0xa0) |
||
| 9346 |
m6 := mload(0xc0) |
||
| 9347 |
// Selector of `log(uint256,uint256,string,uint256)`. |
||
| 9348 |
mstore(0x00, 0x5da297eb) |
||
| 9349 |
mstore(0x20, p0) |
||
| 9350 |
mstore(0x40, p1) |
||
| 9351 |
mstore(0x60, 0x80) |
||
| 9352 |
mstore(0x80, p3) |
||
| 9353 |
writeString(0xa0, p2) |
||
| 9354 |
} |
||
| 9355 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9356 |
assembly {
|
||
| 9357 |
mstore(0x00, m0) |
||
| 9358 |
mstore(0x20, m1) |
||
| 9359 |
mstore(0x40, m2) |
||
| 9360 |
mstore(0x60, m3) |
||
| 9361 |
mstore(0x80, m4) |
||
| 9362 |
mstore(0xa0, m5) |
||
| 9363 |
mstore(0xc0, m6) |
||
| 9364 |
} |
||
| 9365 |
} |
||
| 9366 | |||
| 9367 |
function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 9368 |
bytes32 m0; |
||
| 9369 |
bytes32 m1; |
||
| 9370 |
bytes32 m2; |
||
| 9371 |
bytes32 m3; |
||
| 9372 |
bytes32 m4; |
||
| 9373 |
bytes32 m5; |
||
| 9374 |
bytes32 m6; |
||
| 9375 |
bytes32 m7; |
||
| 9376 |
bytes32 m8; |
||
| 9377 |
assembly {
|
||
| 9378 |
function writeString(pos, w) {
|
||
| 9379 |
let length := 0 |
||
| 9380 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9381 |
mstore(pos, length) |
||
| 9382 |
let shift := sub(256, shl(3, length)) |
||
| 9383 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9384 |
} |
||
| 9385 |
m0 := mload(0x00) |
||
| 9386 |
m1 := mload(0x20) |
||
| 9387 |
m2 := mload(0x40) |
||
| 9388 |
m3 := mload(0x60) |
||
| 9389 |
m4 := mload(0x80) |
||
| 9390 |
m5 := mload(0xa0) |
||
| 9391 |
m6 := mload(0xc0) |
||
| 9392 |
m7 := mload(0xe0) |
||
| 9393 |
m8 := mload(0x100) |
||
| 9394 |
// Selector of `log(uint256,uint256,string,string)`. |
||
| 9395 |
mstore(0x00, 0x27d8afd2) |
||
| 9396 |
mstore(0x20, p0) |
||
| 9397 |
mstore(0x40, p1) |
||
| 9398 |
mstore(0x60, 0x80) |
||
| 9399 |
mstore(0x80, 0xc0) |
||
| 9400 |
writeString(0xa0, p2) |
||
| 9401 |
writeString(0xe0, p3) |
||
| 9402 |
} |
||
| 9403 |
_sendLogPayload(0x1c, 0x104); |
||
| 9404 |
assembly {
|
||
| 9405 |
mstore(0x00, m0) |
||
| 9406 |
mstore(0x20, m1) |
||
| 9407 |
mstore(0x40, m2) |
||
| 9408 |
mstore(0x60, m3) |
||
| 9409 |
mstore(0x80, m4) |
||
| 9410 |
mstore(0xa0, m5) |
||
| 9411 |
mstore(0xc0, m6) |
||
| 9412 |
mstore(0xe0, m7) |
||
| 9413 |
mstore(0x100, m8) |
||
| 9414 |
} |
||
| 9415 |
} |
||
| 9416 | |||
| 9417 |
function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {
|
||
| 9418 |
bytes32 m0; |
||
| 9419 |
bytes32 m1; |
||
| 9420 |
bytes32 m2; |
||
| 9421 |
bytes32 m3; |
||
| 9422 |
bytes32 m4; |
||
| 9423 |
bytes32 m5; |
||
| 9424 |
bytes32 m6; |
||
| 9425 |
assembly {
|
||
| 9426 |
function writeString(pos, w) {
|
||
| 9427 |
let length := 0 |
||
| 9428 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9429 |
mstore(pos, length) |
||
| 9430 |
let shift := sub(256, shl(3, length)) |
||
| 9431 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9432 |
} |
||
| 9433 |
m0 := mload(0x00) |
||
| 9434 |
m1 := mload(0x20) |
||
| 9435 |
m2 := mload(0x40) |
||
| 9436 |
m3 := mload(0x60) |
||
| 9437 |
m4 := mload(0x80) |
||
| 9438 |
m5 := mload(0xa0) |
||
| 9439 |
m6 := mload(0xc0) |
||
| 9440 |
// Selector of `log(uint256,string,address,address)`. |
||
| 9441 |
mstore(0x00, 0x6168ed61) |
||
| 9442 |
mstore(0x20, p0) |
||
| 9443 |
mstore(0x40, 0x80) |
||
| 9444 |
mstore(0x60, p2) |
||
| 9445 |
mstore(0x80, p3) |
||
| 9446 |
writeString(0xa0, p1) |
||
| 9447 |
} |
||
| 9448 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9449 |
assembly {
|
||
| 9450 |
mstore(0x00, m0) |
||
| 9451 |
mstore(0x20, m1) |
||
| 9452 |
mstore(0x40, m2) |
||
| 9453 |
mstore(0x60, m3) |
||
| 9454 |
mstore(0x80, m4) |
||
| 9455 |
mstore(0xa0, m5) |
||
| 9456 |
mstore(0xc0, m6) |
||
| 9457 |
} |
||
| 9458 |
} |
||
| 9459 | |||
| 9460 |
function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {
|
||
| 9461 |
bytes32 m0; |
||
| 9462 |
bytes32 m1; |
||
| 9463 |
bytes32 m2; |
||
| 9464 |
bytes32 m3; |
||
| 9465 |
bytes32 m4; |
||
| 9466 |
bytes32 m5; |
||
| 9467 |
bytes32 m6; |
||
| 9468 |
assembly {
|
||
| 9469 |
function writeString(pos, w) {
|
||
| 9470 |
let length := 0 |
||
| 9471 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9472 |
mstore(pos, length) |
||
| 9473 |
let shift := sub(256, shl(3, length)) |
||
| 9474 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9475 |
} |
||
| 9476 |
m0 := mload(0x00) |
||
| 9477 |
m1 := mload(0x20) |
||
| 9478 |
m2 := mload(0x40) |
||
| 9479 |
m3 := mload(0x60) |
||
| 9480 |
m4 := mload(0x80) |
||
| 9481 |
m5 := mload(0xa0) |
||
| 9482 |
m6 := mload(0xc0) |
||
| 9483 |
// Selector of `log(uint256,string,address,bool)`. |
||
| 9484 |
mstore(0x00, 0x90c30a56) |
||
| 9485 |
mstore(0x20, p0) |
||
| 9486 |
mstore(0x40, 0x80) |
||
| 9487 |
mstore(0x60, p2) |
||
| 9488 |
mstore(0x80, p3) |
||
| 9489 |
writeString(0xa0, p1) |
||
| 9490 |
} |
||
| 9491 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9492 |
assembly {
|
||
| 9493 |
mstore(0x00, m0) |
||
| 9494 |
mstore(0x20, m1) |
||
| 9495 |
mstore(0x40, m2) |
||
| 9496 |
mstore(0x60, m3) |
||
| 9497 |
mstore(0x80, m4) |
||
| 9498 |
mstore(0xa0, m5) |
||
| 9499 |
mstore(0xc0, m6) |
||
| 9500 |
} |
||
| 9501 |
} |
||
| 9502 | |||
| 9503 |
function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {
|
||
| 9504 |
bytes32 m0; |
||
| 9505 |
bytes32 m1; |
||
| 9506 |
bytes32 m2; |
||
| 9507 |
bytes32 m3; |
||
| 9508 |
bytes32 m4; |
||
| 9509 |
bytes32 m5; |
||
| 9510 |
bytes32 m6; |
||
| 9511 |
assembly {
|
||
| 9512 |
function writeString(pos, w) {
|
||
| 9513 |
let length := 0 |
||
| 9514 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9515 |
mstore(pos, length) |
||
| 9516 |
let shift := sub(256, shl(3, length)) |
||
| 9517 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9518 |
} |
||
| 9519 |
m0 := mload(0x00) |
||
| 9520 |
m1 := mload(0x20) |
||
| 9521 |
m2 := mload(0x40) |
||
| 9522 |
m3 := mload(0x60) |
||
| 9523 |
m4 := mload(0x80) |
||
| 9524 |
m5 := mload(0xa0) |
||
| 9525 |
m6 := mload(0xc0) |
||
| 9526 |
// Selector of `log(uint256,string,address,uint256)`. |
||
| 9527 |
mstore(0x00, 0xe8d3018d) |
||
| 9528 |
mstore(0x20, p0) |
||
| 9529 |
mstore(0x40, 0x80) |
||
| 9530 |
mstore(0x60, p2) |
||
| 9531 |
mstore(0x80, p3) |
||
| 9532 |
writeString(0xa0, p1) |
||
| 9533 |
} |
||
| 9534 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9535 |
assembly {
|
||
| 9536 |
mstore(0x00, m0) |
||
| 9537 |
mstore(0x20, m1) |
||
| 9538 |
mstore(0x40, m2) |
||
| 9539 |
mstore(0x60, m3) |
||
| 9540 |
mstore(0x80, m4) |
||
| 9541 |
mstore(0xa0, m5) |
||
| 9542 |
mstore(0xc0, m6) |
||
| 9543 |
} |
||
| 9544 |
} |
||
| 9545 | |||
| 9546 |
function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {
|
||
| 9547 |
bytes32 m0; |
||
| 9548 |
bytes32 m1; |
||
| 9549 |
bytes32 m2; |
||
| 9550 |
bytes32 m3; |
||
| 9551 |
bytes32 m4; |
||
| 9552 |
bytes32 m5; |
||
| 9553 |
bytes32 m6; |
||
| 9554 |
bytes32 m7; |
||
| 9555 |
bytes32 m8; |
||
| 9556 |
assembly {
|
||
| 9557 |
function writeString(pos, w) {
|
||
| 9558 |
let length := 0 |
||
| 9559 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9560 |
mstore(pos, length) |
||
| 9561 |
let shift := sub(256, shl(3, length)) |
||
| 9562 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9563 |
} |
||
| 9564 |
m0 := mload(0x00) |
||
| 9565 |
m1 := mload(0x20) |
||
| 9566 |
m2 := mload(0x40) |
||
| 9567 |
m3 := mload(0x60) |
||
| 9568 |
m4 := mload(0x80) |
||
| 9569 |
m5 := mload(0xa0) |
||
| 9570 |
m6 := mload(0xc0) |
||
| 9571 |
m7 := mload(0xe0) |
||
| 9572 |
m8 := mload(0x100) |
||
| 9573 |
// Selector of `log(uint256,string,address,string)`. |
||
| 9574 |
mstore(0x00, 0x9c3adfa1) |
||
| 9575 |
mstore(0x20, p0) |
||
| 9576 |
mstore(0x40, 0x80) |
||
| 9577 |
mstore(0x60, p2) |
||
| 9578 |
mstore(0x80, 0xc0) |
||
| 9579 |
writeString(0xa0, p1) |
||
| 9580 |
writeString(0xe0, p3) |
||
| 9581 |
} |
||
| 9582 |
_sendLogPayload(0x1c, 0x104); |
||
| 9583 |
assembly {
|
||
| 9584 |
mstore(0x00, m0) |
||
| 9585 |
mstore(0x20, m1) |
||
| 9586 |
mstore(0x40, m2) |
||
| 9587 |
mstore(0x60, m3) |
||
| 9588 |
mstore(0x80, m4) |
||
| 9589 |
mstore(0xa0, m5) |
||
| 9590 |
mstore(0xc0, m6) |
||
| 9591 |
mstore(0xe0, m7) |
||
| 9592 |
mstore(0x100, m8) |
||
| 9593 |
} |
||
| 9594 |
} |
||
| 9595 | |||
| 9596 |
function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {
|
||
| 9597 |
bytes32 m0; |
||
| 9598 |
bytes32 m1; |
||
| 9599 |
bytes32 m2; |
||
| 9600 |
bytes32 m3; |
||
| 9601 |
bytes32 m4; |
||
| 9602 |
bytes32 m5; |
||
| 9603 |
bytes32 m6; |
||
| 9604 |
assembly {
|
||
| 9605 |
function writeString(pos, w) {
|
||
| 9606 |
let length := 0 |
||
| 9607 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9608 |
mstore(pos, length) |
||
| 9609 |
let shift := sub(256, shl(3, length)) |
||
| 9610 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9611 |
} |
||
| 9612 |
m0 := mload(0x00) |
||
| 9613 |
m1 := mload(0x20) |
||
| 9614 |
m2 := mload(0x40) |
||
| 9615 |
m3 := mload(0x60) |
||
| 9616 |
m4 := mload(0x80) |
||
| 9617 |
m5 := mload(0xa0) |
||
| 9618 |
m6 := mload(0xc0) |
||
| 9619 |
// Selector of `log(uint256,string,bool,address)`. |
||
| 9620 |
mstore(0x00, 0xae2ec581) |
||
| 9621 |
mstore(0x20, p0) |
||
| 9622 |
mstore(0x40, 0x80) |
||
| 9623 |
mstore(0x60, p2) |
||
| 9624 |
mstore(0x80, p3) |
||
| 9625 |
writeString(0xa0, p1) |
||
| 9626 |
} |
||
| 9627 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9628 |
assembly {
|
||
| 9629 |
mstore(0x00, m0) |
||
| 9630 |
mstore(0x20, m1) |
||
| 9631 |
mstore(0x40, m2) |
||
| 9632 |
mstore(0x60, m3) |
||
| 9633 |
mstore(0x80, m4) |
||
| 9634 |
mstore(0xa0, m5) |
||
| 9635 |
mstore(0xc0, m6) |
||
| 9636 |
} |
||
| 9637 |
} |
||
| 9638 | |||
| 9639 |
function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {
|
||
| 9640 |
bytes32 m0; |
||
| 9641 |
bytes32 m1; |
||
| 9642 |
bytes32 m2; |
||
| 9643 |
bytes32 m3; |
||
| 9644 |
bytes32 m4; |
||
| 9645 |
bytes32 m5; |
||
| 9646 |
bytes32 m6; |
||
| 9647 |
assembly {
|
||
| 9648 |
function writeString(pos, w) {
|
||
| 9649 |
let length := 0 |
||
| 9650 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9651 |
mstore(pos, length) |
||
| 9652 |
let shift := sub(256, shl(3, length)) |
||
| 9653 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9654 |
} |
||
| 9655 |
m0 := mload(0x00) |
||
| 9656 |
m1 := mload(0x20) |
||
| 9657 |
m2 := mload(0x40) |
||
| 9658 |
m3 := mload(0x60) |
||
| 9659 |
m4 := mload(0x80) |
||
| 9660 |
m5 := mload(0xa0) |
||
| 9661 |
m6 := mload(0xc0) |
||
| 9662 |
// Selector of `log(uint256,string,bool,bool)`. |
||
| 9663 |
mstore(0x00, 0xba535d9c) |
||
| 9664 |
mstore(0x20, p0) |
||
| 9665 |
mstore(0x40, 0x80) |
||
| 9666 |
mstore(0x60, p2) |
||
| 9667 |
mstore(0x80, p3) |
||
| 9668 |
writeString(0xa0, p1) |
||
| 9669 |
} |
||
| 9670 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9671 |
assembly {
|
||
| 9672 |
mstore(0x00, m0) |
||
| 9673 |
mstore(0x20, m1) |
||
| 9674 |
mstore(0x40, m2) |
||
| 9675 |
mstore(0x60, m3) |
||
| 9676 |
mstore(0x80, m4) |
||
| 9677 |
mstore(0xa0, m5) |
||
| 9678 |
mstore(0xc0, m6) |
||
| 9679 |
} |
||
| 9680 |
} |
||
| 9681 | |||
| 9682 |
function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {
|
||
| 9683 |
bytes32 m0; |
||
| 9684 |
bytes32 m1; |
||
| 9685 |
bytes32 m2; |
||
| 9686 |
bytes32 m3; |
||
| 9687 |
bytes32 m4; |
||
| 9688 |
bytes32 m5; |
||
| 9689 |
bytes32 m6; |
||
| 9690 |
assembly {
|
||
| 9691 |
function writeString(pos, w) {
|
||
| 9692 |
let length := 0 |
||
| 9693 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9694 |
mstore(pos, length) |
||
| 9695 |
let shift := sub(256, shl(3, length)) |
||
| 9696 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9697 |
} |
||
| 9698 |
m0 := mload(0x00) |
||
| 9699 |
m1 := mload(0x20) |
||
| 9700 |
m2 := mload(0x40) |
||
| 9701 |
m3 := mload(0x60) |
||
| 9702 |
m4 := mload(0x80) |
||
| 9703 |
m5 := mload(0xa0) |
||
| 9704 |
m6 := mload(0xc0) |
||
| 9705 |
// Selector of `log(uint256,string,bool,uint256)`. |
||
| 9706 |
mstore(0x00, 0xcf009880) |
||
| 9707 |
mstore(0x20, p0) |
||
| 9708 |
mstore(0x40, 0x80) |
||
| 9709 |
mstore(0x60, p2) |
||
| 9710 |
mstore(0x80, p3) |
||
| 9711 |
writeString(0xa0, p1) |
||
| 9712 |
} |
||
| 9713 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9714 |
assembly {
|
||
| 9715 |
mstore(0x00, m0) |
||
| 9716 |
mstore(0x20, m1) |
||
| 9717 |
mstore(0x40, m2) |
||
| 9718 |
mstore(0x60, m3) |
||
| 9719 |
mstore(0x80, m4) |
||
| 9720 |
mstore(0xa0, m5) |
||
| 9721 |
mstore(0xc0, m6) |
||
| 9722 |
} |
||
| 9723 |
} |
||
| 9724 | |||
| 9725 |
function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {
|
||
| 9726 |
bytes32 m0; |
||
| 9727 |
bytes32 m1; |
||
| 9728 |
bytes32 m2; |
||
| 9729 |
bytes32 m3; |
||
| 9730 |
bytes32 m4; |
||
| 9731 |
bytes32 m5; |
||
| 9732 |
bytes32 m6; |
||
| 9733 |
bytes32 m7; |
||
| 9734 |
bytes32 m8; |
||
| 9735 |
assembly {
|
||
| 9736 |
function writeString(pos, w) {
|
||
| 9737 |
let length := 0 |
||
| 9738 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9739 |
mstore(pos, length) |
||
| 9740 |
let shift := sub(256, shl(3, length)) |
||
| 9741 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9742 |
} |
||
| 9743 |
m0 := mload(0x00) |
||
| 9744 |
m1 := mload(0x20) |
||
| 9745 |
m2 := mload(0x40) |
||
| 9746 |
m3 := mload(0x60) |
||
| 9747 |
m4 := mload(0x80) |
||
| 9748 |
m5 := mload(0xa0) |
||
| 9749 |
m6 := mload(0xc0) |
||
| 9750 |
m7 := mload(0xe0) |
||
| 9751 |
m8 := mload(0x100) |
||
| 9752 |
// Selector of `log(uint256,string,bool,string)`. |
||
| 9753 |
mstore(0x00, 0xd2d423cd) |
||
| 9754 |
mstore(0x20, p0) |
||
| 9755 |
mstore(0x40, 0x80) |
||
| 9756 |
mstore(0x60, p2) |
||
| 9757 |
mstore(0x80, 0xc0) |
||
| 9758 |
writeString(0xa0, p1) |
||
| 9759 |
writeString(0xe0, p3) |
||
| 9760 |
} |
||
| 9761 |
_sendLogPayload(0x1c, 0x104); |
||
| 9762 |
assembly {
|
||
| 9763 |
mstore(0x00, m0) |
||
| 9764 |
mstore(0x20, m1) |
||
| 9765 |
mstore(0x40, m2) |
||
| 9766 |
mstore(0x60, m3) |
||
| 9767 |
mstore(0x80, m4) |
||
| 9768 |
mstore(0xa0, m5) |
||
| 9769 |
mstore(0xc0, m6) |
||
| 9770 |
mstore(0xe0, m7) |
||
| 9771 |
mstore(0x100, m8) |
||
| 9772 |
} |
||
| 9773 |
} |
||
| 9774 | |||
| 9775 |
function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {
|
||
| 9776 |
bytes32 m0; |
||
| 9777 |
bytes32 m1; |
||
| 9778 |
bytes32 m2; |
||
| 9779 |
bytes32 m3; |
||
| 9780 |
bytes32 m4; |
||
| 9781 |
bytes32 m5; |
||
| 9782 |
bytes32 m6; |
||
| 9783 |
assembly {
|
||
| 9784 |
function writeString(pos, w) {
|
||
| 9785 |
let length := 0 |
||
| 9786 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9787 |
mstore(pos, length) |
||
| 9788 |
let shift := sub(256, shl(3, length)) |
||
| 9789 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9790 |
} |
||
| 9791 |
m0 := mload(0x00) |
||
| 9792 |
m1 := mload(0x20) |
||
| 9793 |
m2 := mload(0x40) |
||
| 9794 |
m3 := mload(0x60) |
||
| 9795 |
m4 := mload(0x80) |
||
| 9796 |
m5 := mload(0xa0) |
||
| 9797 |
m6 := mload(0xc0) |
||
| 9798 |
// Selector of `log(uint256,string,uint256,address)`. |
||
| 9799 |
mstore(0x00, 0x3b2279b4) |
||
| 9800 |
mstore(0x20, p0) |
||
| 9801 |
mstore(0x40, 0x80) |
||
| 9802 |
mstore(0x60, p2) |
||
| 9803 |
mstore(0x80, p3) |
||
| 9804 |
writeString(0xa0, p1) |
||
| 9805 |
} |
||
| 9806 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9807 |
assembly {
|
||
| 9808 |
mstore(0x00, m0) |
||
| 9809 |
mstore(0x20, m1) |
||
| 9810 |
mstore(0x40, m2) |
||
| 9811 |
mstore(0x60, m3) |
||
| 9812 |
mstore(0x80, m4) |
||
| 9813 |
mstore(0xa0, m5) |
||
| 9814 |
mstore(0xc0, m6) |
||
| 9815 |
} |
||
| 9816 |
} |
||
| 9817 | |||
| 9818 |
function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {
|
||
| 9819 |
bytes32 m0; |
||
| 9820 |
bytes32 m1; |
||
| 9821 |
bytes32 m2; |
||
| 9822 |
bytes32 m3; |
||
| 9823 |
bytes32 m4; |
||
| 9824 |
bytes32 m5; |
||
| 9825 |
bytes32 m6; |
||
| 9826 |
assembly {
|
||
| 9827 |
function writeString(pos, w) {
|
||
| 9828 |
let length := 0 |
||
| 9829 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9830 |
mstore(pos, length) |
||
| 9831 |
let shift := sub(256, shl(3, length)) |
||
| 9832 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9833 |
} |
||
| 9834 |
m0 := mload(0x00) |
||
| 9835 |
m1 := mload(0x20) |
||
| 9836 |
m2 := mload(0x40) |
||
| 9837 |
m3 := mload(0x60) |
||
| 9838 |
m4 := mload(0x80) |
||
| 9839 |
m5 := mload(0xa0) |
||
| 9840 |
m6 := mload(0xc0) |
||
| 9841 |
// Selector of `log(uint256,string,uint256,bool)`. |
||
| 9842 |
mstore(0x00, 0x691a8f74) |
||
| 9843 |
mstore(0x20, p0) |
||
| 9844 |
mstore(0x40, 0x80) |
||
| 9845 |
mstore(0x60, p2) |
||
| 9846 |
mstore(0x80, p3) |
||
| 9847 |
writeString(0xa0, p1) |
||
| 9848 |
} |
||
| 9849 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9850 |
assembly {
|
||
| 9851 |
mstore(0x00, m0) |
||
| 9852 |
mstore(0x20, m1) |
||
| 9853 |
mstore(0x40, m2) |
||
| 9854 |
mstore(0x60, m3) |
||
| 9855 |
mstore(0x80, m4) |
||
| 9856 |
mstore(0xa0, m5) |
||
| 9857 |
mstore(0xc0, m6) |
||
| 9858 |
} |
||
| 9859 |
} |
||
| 9860 | |||
| 9861 |
function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 9862 |
bytes32 m0; |
||
| 9863 |
bytes32 m1; |
||
| 9864 |
bytes32 m2; |
||
| 9865 |
bytes32 m3; |
||
| 9866 |
bytes32 m4; |
||
| 9867 |
bytes32 m5; |
||
| 9868 |
bytes32 m6; |
||
| 9869 |
assembly {
|
||
| 9870 |
function writeString(pos, w) {
|
||
| 9871 |
let length := 0 |
||
| 9872 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9873 |
mstore(pos, length) |
||
| 9874 |
let shift := sub(256, shl(3, length)) |
||
| 9875 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9876 |
} |
||
| 9877 |
m0 := mload(0x00) |
||
| 9878 |
m1 := mload(0x20) |
||
| 9879 |
m2 := mload(0x40) |
||
| 9880 |
m3 := mload(0x60) |
||
| 9881 |
m4 := mload(0x80) |
||
| 9882 |
m5 := mload(0xa0) |
||
| 9883 |
m6 := mload(0xc0) |
||
| 9884 |
// Selector of `log(uint256,string,uint256,uint256)`. |
||
| 9885 |
mstore(0x00, 0x82c25b74) |
||
| 9886 |
mstore(0x20, p0) |
||
| 9887 |
mstore(0x40, 0x80) |
||
| 9888 |
mstore(0x60, p2) |
||
| 9889 |
mstore(0x80, p3) |
||
| 9890 |
writeString(0xa0, p1) |
||
| 9891 |
} |
||
| 9892 |
_sendLogPayload(0x1c, 0xc4); |
||
| 9893 |
assembly {
|
||
| 9894 |
mstore(0x00, m0) |
||
| 9895 |
mstore(0x20, m1) |
||
| 9896 |
mstore(0x40, m2) |
||
| 9897 |
mstore(0x60, m3) |
||
| 9898 |
mstore(0x80, m4) |
||
| 9899 |
mstore(0xa0, m5) |
||
| 9900 |
mstore(0xc0, m6) |
||
| 9901 |
} |
||
| 9902 |
} |
||
| 9903 | |||
| 9904 |
function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 9905 |
bytes32 m0; |
||
| 9906 |
bytes32 m1; |
||
| 9907 |
bytes32 m2; |
||
| 9908 |
bytes32 m3; |
||
| 9909 |
bytes32 m4; |
||
| 9910 |
bytes32 m5; |
||
| 9911 |
bytes32 m6; |
||
| 9912 |
bytes32 m7; |
||
| 9913 |
bytes32 m8; |
||
| 9914 |
assembly {
|
||
| 9915 |
function writeString(pos, w) {
|
||
| 9916 |
let length := 0 |
||
| 9917 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9918 |
mstore(pos, length) |
||
| 9919 |
let shift := sub(256, shl(3, length)) |
||
| 9920 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9921 |
} |
||
| 9922 |
m0 := mload(0x00) |
||
| 9923 |
m1 := mload(0x20) |
||
| 9924 |
m2 := mload(0x40) |
||
| 9925 |
m3 := mload(0x60) |
||
| 9926 |
m4 := mload(0x80) |
||
| 9927 |
m5 := mload(0xa0) |
||
| 9928 |
m6 := mload(0xc0) |
||
| 9929 |
m7 := mload(0xe0) |
||
| 9930 |
m8 := mload(0x100) |
||
| 9931 |
// Selector of `log(uint256,string,uint256,string)`. |
||
| 9932 |
mstore(0x00, 0xb7b914ca) |
||
| 9933 |
mstore(0x20, p0) |
||
| 9934 |
mstore(0x40, 0x80) |
||
| 9935 |
mstore(0x60, p2) |
||
| 9936 |
mstore(0x80, 0xc0) |
||
| 9937 |
writeString(0xa0, p1) |
||
| 9938 |
writeString(0xe0, p3) |
||
| 9939 |
} |
||
| 9940 |
_sendLogPayload(0x1c, 0x104); |
||
| 9941 |
assembly {
|
||
| 9942 |
mstore(0x00, m0) |
||
| 9943 |
mstore(0x20, m1) |
||
| 9944 |
mstore(0x40, m2) |
||
| 9945 |
mstore(0x60, m3) |
||
| 9946 |
mstore(0x80, m4) |
||
| 9947 |
mstore(0xa0, m5) |
||
| 9948 |
mstore(0xc0, m6) |
||
| 9949 |
mstore(0xe0, m7) |
||
| 9950 |
mstore(0x100, m8) |
||
| 9951 |
} |
||
| 9952 |
} |
||
| 9953 | |||
| 9954 |
function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {
|
||
| 9955 |
bytes32 m0; |
||
| 9956 |
bytes32 m1; |
||
| 9957 |
bytes32 m2; |
||
| 9958 |
bytes32 m3; |
||
| 9959 |
bytes32 m4; |
||
| 9960 |
bytes32 m5; |
||
| 9961 |
bytes32 m6; |
||
| 9962 |
bytes32 m7; |
||
| 9963 |
bytes32 m8; |
||
| 9964 |
assembly {
|
||
| 9965 |
function writeString(pos, w) {
|
||
| 9966 |
let length := 0 |
||
| 9967 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 9968 |
mstore(pos, length) |
||
| 9969 |
let shift := sub(256, shl(3, length)) |
||
| 9970 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 9971 |
} |
||
| 9972 |
m0 := mload(0x00) |
||
| 9973 |
m1 := mload(0x20) |
||
| 9974 |
m2 := mload(0x40) |
||
| 9975 |
m3 := mload(0x60) |
||
| 9976 |
m4 := mload(0x80) |
||
| 9977 |
m5 := mload(0xa0) |
||
| 9978 |
m6 := mload(0xc0) |
||
| 9979 |
m7 := mload(0xe0) |
||
| 9980 |
m8 := mload(0x100) |
||
| 9981 |
// Selector of `log(uint256,string,string,address)`. |
||
| 9982 |
mstore(0x00, 0xd583c602) |
||
| 9983 |
mstore(0x20, p0) |
||
| 9984 |
mstore(0x40, 0x80) |
||
| 9985 |
mstore(0x60, 0xc0) |
||
| 9986 |
mstore(0x80, p3) |
||
| 9987 |
writeString(0xa0, p1) |
||
| 9988 |
writeString(0xe0, p2) |
||
| 9989 |
} |
||
| 9990 |
_sendLogPayload(0x1c, 0x104); |
||
| 9991 |
assembly {
|
||
| 9992 |
mstore(0x00, m0) |
||
| 9993 |
mstore(0x20, m1) |
||
| 9994 |
mstore(0x40, m2) |
||
| 9995 |
mstore(0x60, m3) |
||
| 9996 |
mstore(0x80, m4) |
||
| 9997 |
mstore(0xa0, m5) |
||
| 9998 |
mstore(0xc0, m6) |
||
| 9999 |
mstore(0xe0, m7) |
||
| 10000 |
mstore(0x100, m8) |
||
| 10001 |
} |
||
| 10002 |
} |
||
| 10003 | |||
| 10004 |
function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {
|
||
| 10005 |
bytes32 m0; |
||
| 10006 |
bytes32 m1; |
||
| 10007 |
bytes32 m2; |
||
| 10008 |
bytes32 m3; |
||
| 10009 |
bytes32 m4; |
||
| 10010 |
bytes32 m5; |
||
| 10011 |
bytes32 m6; |
||
| 10012 |
bytes32 m7; |
||
| 10013 |
bytes32 m8; |
||
| 10014 |
assembly {
|
||
| 10015 |
function writeString(pos, w) {
|
||
| 10016 |
let length := 0 |
||
| 10017 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10018 |
mstore(pos, length) |
||
| 10019 |
let shift := sub(256, shl(3, length)) |
||
| 10020 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10021 |
} |
||
| 10022 |
m0 := mload(0x00) |
||
| 10023 |
m1 := mload(0x20) |
||
| 10024 |
m2 := mload(0x40) |
||
| 10025 |
m3 := mload(0x60) |
||
| 10026 |
m4 := mload(0x80) |
||
| 10027 |
m5 := mload(0xa0) |
||
| 10028 |
m6 := mload(0xc0) |
||
| 10029 |
m7 := mload(0xe0) |
||
| 10030 |
m8 := mload(0x100) |
||
| 10031 |
// Selector of `log(uint256,string,string,bool)`. |
||
| 10032 |
mstore(0x00, 0xb3a6b6bd) |
||
| 10033 |
mstore(0x20, p0) |
||
| 10034 |
mstore(0x40, 0x80) |
||
| 10035 |
mstore(0x60, 0xc0) |
||
| 10036 |
mstore(0x80, p3) |
||
| 10037 |
writeString(0xa0, p1) |
||
| 10038 |
writeString(0xe0, p2) |
||
| 10039 |
} |
||
| 10040 |
_sendLogPayload(0x1c, 0x104); |
||
| 10041 |
assembly {
|
||
| 10042 |
mstore(0x00, m0) |
||
| 10043 |
mstore(0x20, m1) |
||
| 10044 |
mstore(0x40, m2) |
||
| 10045 |
mstore(0x60, m3) |
||
| 10046 |
mstore(0x80, m4) |
||
| 10047 |
mstore(0xa0, m5) |
||
| 10048 |
mstore(0xc0, m6) |
||
| 10049 |
mstore(0xe0, m7) |
||
| 10050 |
mstore(0x100, m8) |
||
| 10051 |
} |
||
| 10052 |
} |
||
| 10053 | |||
| 10054 |
function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 10055 |
bytes32 m0; |
||
| 10056 |
bytes32 m1; |
||
| 10057 |
bytes32 m2; |
||
| 10058 |
bytes32 m3; |
||
| 10059 |
bytes32 m4; |
||
| 10060 |
bytes32 m5; |
||
| 10061 |
bytes32 m6; |
||
| 10062 |
bytes32 m7; |
||
| 10063 |
bytes32 m8; |
||
| 10064 |
assembly {
|
||
| 10065 |
function writeString(pos, w) {
|
||
| 10066 |
let length := 0 |
||
| 10067 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10068 |
mstore(pos, length) |
||
| 10069 |
let shift := sub(256, shl(3, length)) |
||
| 10070 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10071 |
} |
||
| 10072 |
m0 := mload(0x00) |
||
| 10073 |
m1 := mload(0x20) |
||
| 10074 |
m2 := mload(0x40) |
||
| 10075 |
m3 := mload(0x60) |
||
| 10076 |
m4 := mload(0x80) |
||
| 10077 |
m5 := mload(0xa0) |
||
| 10078 |
m6 := mload(0xc0) |
||
| 10079 |
m7 := mload(0xe0) |
||
| 10080 |
m8 := mload(0x100) |
||
| 10081 |
// Selector of `log(uint256,string,string,uint256)`. |
||
| 10082 |
mstore(0x00, 0xb028c9bd) |
||
| 10083 |
mstore(0x20, p0) |
||
| 10084 |
mstore(0x40, 0x80) |
||
| 10085 |
mstore(0x60, 0xc0) |
||
| 10086 |
mstore(0x80, p3) |
||
| 10087 |
writeString(0xa0, p1) |
||
| 10088 |
writeString(0xe0, p2) |
||
| 10089 |
} |
||
| 10090 |
_sendLogPayload(0x1c, 0x104); |
||
| 10091 |
assembly {
|
||
| 10092 |
mstore(0x00, m0) |
||
| 10093 |
mstore(0x20, m1) |
||
| 10094 |
mstore(0x40, m2) |
||
| 10095 |
mstore(0x60, m3) |
||
| 10096 |
mstore(0x80, m4) |
||
| 10097 |
mstore(0xa0, m5) |
||
| 10098 |
mstore(0xc0, m6) |
||
| 10099 |
mstore(0xe0, m7) |
||
| 10100 |
mstore(0x100, m8) |
||
| 10101 |
} |
||
| 10102 |
} |
||
| 10103 | |||
| 10104 |
function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 10105 |
bytes32 m0; |
||
| 10106 |
bytes32 m1; |
||
| 10107 |
bytes32 m2; |
||
| 10108 |
bytes32 m3; |
||
| 10109 |
bytes32 m4; |
||
| 10110 |
bytes32 m5; |
||
| 10111 |
bytes32 m6; |
||
| 10112 |
bytes32 m7; |
||
| 10113 |
bytes32 m8; |
||
| 10114 |
bytes32 m9; |
||
| 10115 |
bytes32 m10; |
||
| 10116 |
assembly {
|
||
| 10117 |
function writeString(pos, w) {
|
||
| 10118 |
let length := 0 |
||
| 10119 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10120 |
mstore(pos, length) |
||
| 10121 |
let shift := sub(256, shl(3, length)) |
||
| 10122 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10123 |
} |
||
| 10124 |
m0 := mload(0x00) |
||
| 10125 |
m1 := mload(0x20) |
||
| 10126 |
m2 := mload(0x40) |
||
| 10127 |
m3 := mload(0x60) |
||
| 10128 |
m4 := mload(0x80) |
||
| 10129 |
m5 := mload(0xa0) |
||
| 10130 |
m6 := mload(0xc0) |
||
| 10131 |
m7 := mload(0xe0) |
||
| 10132 |
m8 := mload(0x100) |
||
| 10133 |
m9 := mload(0x120) |
||
| 10134 |
m10 := mload(0x140) |
||
| 10135 |
// Selector of `log(uint256,string,string,string)`. |
||
| 10136 |
mstore(0x00, 0x21ad0683) |
||
| 10137 |
mstore(0x20, p0) |
||
| 10138 |
mstore(0x40, 0x80) |
||
| 10139 |
mstore(0x60, 0xc0) |
||
| 10140 |
mstore(0x80, 0x100) |
||
| 10141 |
writeString(0xa0, p1) |
||
| 10142 |
writeString(0xe0, p2) |
||
| 10143 |
writeString(0x120, p3) |
||
| 10144 |
} |
||
| 10145 |
_sendLogPayload(0x1c, 0x144); |
||
| 10146 |
assembly {
|
||
| 10147 |
mstore(0x00, m0) |
||
| 10148 |
mstore(0x20, m1) |
||
| 10149 |
mstore(0x40, m2) |
||
| 10150 |
mstore(0x60, m3) |
||
| 10151 |
mstore(0x80, m4) |
||
| 10152 |
mstore(0xa0, m5) |
||
| 10153 |
mstore(0xc0, m6) |
||
| 10154 |
mstore(0xe0, m7) |
||
| 10155 |
mstore(0x100, m8) |
||
| 10156 |
mstore(0x120, m9) |
||
| 10157 |
mstore(0x140, m10) |
||
| 10158 |
} |
||
| 10159 |
} |
||
| 10160 | |||
| 10161 |
function log(bytes32 p0, address p1, address p2, address p3) internal pure {
|
||
| 10162 |
bytes32 m0; |
||
| 10163 |
bytes32 m1; |
||
| 10164 |
bytes32 m2; |
||
| 10165 |
bytes32 m3; |
||
| 10166 |
bytes32 m4; |
||
| 10167 |
bytes32 m5; |
||
| 10168 |
bytes32 m6; |
||
| 10169 |
assembly {
|
||
| 10170 |
function writeString(pos, w) {
|
||
| 10171 |
let length := 0 |
||
| 10172 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10173 |
mstore(pos, length) |
||
| 10174 |
let shift := sub(256, shl(3, length)) |
||
| 10175 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10176 |
} |
||
| 10177 |
m0 := mload(0x00) |
||
| 10178 |
m1 := mload(0x20) |
||
| 10179 |
m2 := mload(0x40) |
||
| 10180 |
m3 := mload(0x60) |
||
| 10181 |
m4 := mload(0x80) |
||
| 10182 |
m5 := mload(0xa0) |
||
| 10183 |
m6 := mload(0xc0) |
||
| 10184 |
// Selector of `log(string,address,address,address)`. |
||
| 10185 |
mstore(0x00, 0xed8f28f6) |
||
| 10186 |
mstore(0x20, 0x80) |
||
| 10187 |
mstore(0x40, p1) |
||
| 10188 |
mstore(0x60, p2) |
||
| 10189 |
mstore(0x80, p3) |
||
| 10190 |
writeString(0xa0, p0) |
||
| 10191 |
} |
||
| 10192 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10193 |
assembly {
|
||
| 10194 |
mstore(0x00, m0) |
||
| 10195 |
mstore(0x20, m1) |
||
| 10196 |
mstore(0x40, m2) |
||
| 10197 |
mstore(0x60, m3) |
||
| 10198 |
mstore(0x80, m4) |
||
| 10199 |
mstore(0xa0, m5) |
||
| 10200 |
mstore(0xc0, m6) |
||
| 10201 |
} |
||
| 10202 |
} |
||
| 10203 | |||
| 10204 |
function log(bytes32 p0, address p1, address p2, bool p3) internal pure {
|
||
| 10205 |
bytes32 m0; |
||
| 10206 |
bytes32 m1; |
||
| 10207 |
bytes32 m2; |
||
| 10208 |
bytes32 m3; |
||
| 10209 |
bytes32 m4; |
||
| 10210 |
bytes32 m5; |
||
| 10211 |
bytes32 m6; |
||
| 10212 |
assembly {
|
||
| 10213 |
function writeString(pos, w) {
|
||
| 10214 |
let length := 0 |
||
| 10215 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10216 |
mstore(pos, length) |
||
| 10217 |
let shift := sub(256, shl(3, length)) |
||
| 10218 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10219 |
} |
||
| 10220 |
m0 := mload(0x00) |
||
| 10221 |
m1 := mload(0x20) |
||
| 10222 |
m2 := mload(0x40) |
||
| 10223 |
m3 := mload(0x60) |
||
| 10224 |
m4 := mload(0x80) |
||
| 10225 |
m5 := mload(0xa0) |
||
| 10226 |
m6 := mload(0xc0) |
||
| 10227 |
// Selector of `log(string,address,address,bool)`. |
||
| 10228 |
mstore(0x00, 0xb59dbd60) |
||
| 10229 |
mstore(0x20, 0x80) |
||
| 10230 |
mstore(0x40, p1) |
||
| 10231 |
mstore(0x60, p2) |
||
| 10232 |
mstore(0x80, p3) |
||
| 10233 |
writeString(0xa0, p0) |
||
| 10234 |
} |
||
| 10235 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10236 |
assembly {
|
||
| 10237 |
mstore(0x00, m0) |
||
| 10238 |
mstore(0x20, m1) |
||
| 10239 |
mstore(0x40, m2) |
||
| 10240 |
mstore(0x60, m3) |
||
| 10241 |
mstore(0x80, m4) |
||
| 10242 |
mstore(0xa0, m5) |
||
| 10243 |
mstore(0xc0, m6) |
||
| 10244 |
} |
||
| 10245 |
} |
||
| 10246 | |||
| 10247 |
function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {
|
||
| 10248 |
bytes32 m0; |
||
| 10249 |
bytes32 m1; |
||
| 10250 |
bytes32 m2; |
||
| 10251 |
bytes32 m3; |
||
| 10252 |
bytes32 m4; |
||
| 10253 |
bytes32 m5; |
||
| 10254 |
bytes32 m6; |
||
| 10255 |
assembly {
|
||
| 10256 |
function writeString(pos, w) {
|
||
| 10257 |
let length := 0 |
||
| 10258 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10259 |
mstore(pos, length) |
||
| 10260 |
let shift := sub(256, shl(3, length)) |
||
| 10261 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10262 |
} |
||
| 10263 |
m0 := mload(0x00) |
||
| 10264 |
m1 := mload(0x20) |
||
| 10265 |
m2 := mload(0x40) |
||
| 10266 |
m3 := mload(0x60) |
||
| 10267 |
m4 := mload(0x80) |
||
| 10268 |
m5 := mload(0xa0) |
||
| 10269 |
m6 := mload(0xc0) |
||
| 10270 |
// Selector of `log(string,address,address,uint256)`. |
||
| 10271 |
mstore(0x00, 0x8ef3f399) |
||
| 10272 |
mstore(0x20, 0x80) |
||
| 10273 |
mstore(0x40, p1) |
||
| 10274 |
mstore(0x60, p2) |
||
| 10275 |
mstore(0x80, p3) |
||
| 10276 |
writeString(0xa0, p0) |
||
| 10277 |
} |
||
| 10278 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10279 |
assembly {
|
||
| 10280 |
mstore(0x00, m0) |
||
| 10281 |
mstore(0x20, m1) |
||
| 10282 |
mstore(0x40, m2) |
||
| 10283 |
mstore(0x60, m3) |
||
| 10284 |
mstore(0x80, m4) |
||
| 10285 |
mstore(0xa0, m5) |
||
| 10286 |
mstore(0xc0, m6) |
||
| 10287 |
} |
||
| 10288 |
} |
||
| 10289 | |||
| 10290 |
function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {
|
||
| 10291 |
bytes32 m0; |
||
| 10292 |
bytes32 m1; |
||
| 10293 |
bytes32 m2; |
||
| 10294 |
bytes32 m3; |
||
| 10295 |
bytes32 m4; |
||
| 10296 |
bytes32 m5; |
||
| 10297 |
bytes32 m6; |
||
| 10298 |
bytes32 m7; |
||
| 10299 |
bytes32 m8; |
||
| 10300 |
assembly {
|
||
| 10301 |
function writeString(pos, w) {
|
||
| 10302 |
let length := 0 |
||
| 10303 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10304 |
mstore(pos, length) |
||
| 10305 |
let shift := sub(256, shl(3, length)) |
||
| 10306 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10307 |
} |
||
| 10308 |
m0 := mload(0x00) |
||
| 10309 |
m1 := mload(0x20) |
||
| 10310 |
m2 := mload(0x40) |
||
| 10311 |
m3 := mload(0x60) |
||
| 10312 |
m4 := mload(0x80) |
||
| 10313 |
m5 := mload(0xa0) |
||
| 10314 |
m6 := mload(0xc0) |
||
| 10315 |
m7 := mload(0xe0) |
||
| 10316 |
m8 := mload(0x100) |
||
| 10317 |
// Selector of `log(string,address,address,string)`. |
||
| 10318 |
mstore(0x00, 0x800a1c67) |
||
| 10319 |
mstore(0x20, 0x80) |
||
| 10320 |
mstore(0x40, p1) |
||
| 10321 |
mstore(0x60, p2) |
||
| 10322 |
mstore(0x80, 0xc0) |
||
| 10323 |
writeString(0xa0, p0) |
||
| 10324 |
writeString(0xe0, p3) |
||
| 10325 |
} |
||
| 10326 |
_sendLogPayload(0x1c, 0x104); |
||
| 10327 |
assembly {
|
||
| 10328 |
mstore(0x00, m0) |
||
| 10329 |
mstore(0x20, m1) |
||
| 10330 |
mstore(0x40, m2) |
||
| 10331 |
mstore(0x60, m3) |
||
| 10332 |
mstore(0x80, m4) |
||
| 10333 |
mstore(0xa0, m5) |
||
| 10334 |
mstore(0xc0, m6) |
||
| 10335 |
mstore(0xe0, m7) |
||
| 10336 |
mstore(0x100, m8) |
||
| 10337 |
} |
||
| 10338 |
} |
||
| 10339 | |||
| 10340 |
function log(bytes32 p0, address p1, bool p2, address p3) internal pure {
|
||
| 10341 |
bytes32 m0; |
||
| 10342 |
bytes32 m1; |
||
| 10343 |
bytes32 m2; |
||
| 10344 |
bytes32 m3; |
||
| 10345 |
bytes32 m4; |
||
| 10346 |
bytes32 m5; |
||
| 10347 |
bytes32 m6; |
||
| 10348 |
assembly {
|
||
| 10349 |
function writeString(pos, w) {
|
||
| 10350 |
let length := 0 |
||
| 10351 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10352 |
mstore(pos, length) |
||
| 10353 |
let shift := sub(256, shl(3, length)) |
||
| 10354 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10355 |
} |
||
| 10356 |
m0 := mload(0x00) |
||
| 10357 |
m1 := mload(0x20) |
||
| 10358 |
m2 := mload(0x40) |
||
| 10359 |
m3 := mload(0x60) |
||
| 10360 |
m4 := mload(0x80) |
||
| 10361 |
m5 := mload(0xa0) |
||
| 10362 |
m6 := mload(0xc0) |
||
| 10363 |
// Selector of `log(string,address,bool,address)`. |
||
| 10364 |
mstore(0x00, 0x223603bd) |
||
| 10365 |
mstore(0x20, 0x80) |
||
| 10366 |
mstore(0x40, p1) |
||
| 10367 |
mstore(0x60, p2) |
||
| 10368 |
mstore(0x80, p3) |
||
| 10369 |
writeString(0xa0, p0) |
||
| 10370 |
} |
||
| 10371 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10372 |
assembly {
|
||
| 10373 |
mstore(0x00, m0) |
||
| 10374 |
mstore(0x20, m1) |
||
| 10375 |
mstore(0x40, m2) |
||
| 10376 |
mstore(0x60, m3) |
||
| 10377 |
mstore(0x80, m4) |
||
| 10378 |
mstore(0xa0, m5) |
||
| 10379 |
mstore(0xc0, m6) |
||
| 10380 |
} |
||
| 10381 |
} |
||
| 10382 | |||
| 10383 |
function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {
|
||
| 10384 |
bytes32 m0; |
||
| 10385 |
bytes32 m1; |
||
| 10386 |
bytes32 m2; |
||
| 10387 |
bytes32 m3; |
||
| 10388 |
bytes32 m4; |
||
| 10389 |
bytes32 m5; |
||
| 10390 |
bytes32 m6; |
||
| 10391 |
assembly {
|
||
| 10392 |
function writeString(pos, w) {
|
||
| 10393 |
let length := 0 |
||
| 10394 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10395 |
mstore(pos, length) |
||
| 10396 |
let shift := sub(256, shl(3, length)) |
||
| 10397 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10398 |
} |
||
| 10399 |
m0 := mload(0x00) |
||
| 10400 |
m1 := mload(0x20) |
||
| 10401 |
m2 := mload(0x40) |
||
| 10402 |
m3 := mload(0x60) |
||
| 10403 |
m4 := mload(0x80) |
||
| 10404 |
m5 := mload(0xa0) |
||
| 10405 |
m6 := mload(0xc0) |
||
| 10406 |
// Selector of `log(string,address,bool,bool)`. |
||
| 10407 |
mstore(0x00, 0x79884c2b) |
||
| 10408 |
mstore(0x20, 0x80) |
||
| 10409 |
mstore(0x40, p1) |
||
| 10410 |
mstore(0x60, p2) |
||
| 10411 |
mstore(0x80, p3) |
||
| 10412 |
writeString(0xa0, p0) |
||
| 10413 |
} |
||
| 10414 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10415 |
assembly {
|
||
| 10416 |
mstore(0x00, m0) |
||
| 10417 |
mstore(0x20, m1) |
||
| 10418 |
mstore(0x40, m2) |
||
| 10419 |
mstore(0x60, m3) |
||
| 10420 |
mstore(0x80, m4) |
||
| 10421 |
mstore(0xa0, m5) |
||
| 10422 |
mstore(0xc0, m6) |
||
| 10423 |
} |
||
| 10424 |
} |
||
| 10425 | |||
| 10426 |
function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {
|
||
| 10427 |
bytes32 m0; |
||
| 10428 |
bytes32 m1; |
||
| 10429 |
bytes32 m2; |
||
| 10430 |
bytes32 m3; |
||
| 10431 |
bytes32 m4; |
||
| 10432 |
bytes32 m5; |
||
| 10433 |
bytes32 m6; |
||
| 10434 |
assembly {
|
||
| 10435 |
function writeString(pos, w) {
|
||
| 10436 |
let length := 0 |
||
| 10437 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10438 |
mstore(pos, length) |
||
| 10439 |
let shift := sub(256, shl(3, length)) |
||
| 10440 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10441 |
} |
||
| 10442 |
m0 := mload(0x00) |
||
| 10443 |
m1 := mload(0x20) |
||
| 10444 |
m2 := mload(0x40) |
||
| 10445 |
m3 := mload(0x60) |
||
| 10446 |
m4 := mload(0x80) |
||
| 10447 |
m5 := mload(0xa0) |
||
| 10448 |
m6 := mload(0xc0) |
||
| 10449 |
// Selector of `log(string,address,bool,uint256)`. |
||
| 10450 |
mstore(0x00, 0x3e9f866a) |
||
| 10451 |
mstore(0x20, 0x80) |
||
| 10452 |
mstore(0x40, p1) |
||
| 10453 |
mstore(0x60, p2) |
||
| 10454 |
mstore(0x80, p3) |
||
| 10455 |
writeString(0xa0, p0) |
||
| 10456 |
} |
||
| 10457 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10458 |
assembly {
|
||
| 10459 |
mstore(0x00, m0) |
||
| 10460 |
mstore(0x20, m1) |
||
| 10461 |
mstore(0x40, m2) |
||
| 10462 |
mstore(0x60, m3) |
||
| 10463 |
mstore(0x80, m4) |
||
| 10464 |
mstore(0xa0, m5) |
||
| 10465 |
mstore(0xc0, m6) |
||
| 10466 |
} |
||
| 10467 |
} |
||
| 10468 | |||
| 10469 |
function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {
|
||
| 10470 |
bytes32 m0; |
||
| 10471 |
bytes32 m1; |
||
| 10472 |
bytes32 m2; |
||
| 10473 |
bytes32 m3; |
||
| 10474 |
bytes32 m4; |
||
| 10475 |
bytes32 m5; |
||
| 10476 |
bytes32 m6; |
||
| 10477 |
bytes32 m7; |
||
| 10478 |
bytes32 m8; |
||
| 10479 |
assembly {
|
||
| 10480 |
function writeString(pos, w) {
|
||
| 10481 |
let length := 0 |
||
| 10482 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10483 |
mstore(pos, length) |
||
| 10484 |
let shift := sub(256, shl(3, length)) |
||
| 10485 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10486 |
} |
||
| 10487 |
m0 := mload(0x00) |
||
| 10488 |
m1 := mload(0x20) |
||
| 10489 |
m2 := mload(0x40) |
||
| 10490 |
m3 := mload(0x60) |
||
| 10491 |
m4 := mload(0x80) |
||
| 10492 |
m5 := mload(0xa0) |
||
| 10493 |
m6 := mload(0xc0) |
||
| 10494 |
m7 := mload(0xe0) |
||
| 10495 |
m8 := mload(0x100) |
||
| 10496 |
// Selector of `log(string,address,bool,string)`. |
||
| 10497 |
mstore(0x00, 0x0454c079) |
||
| 10498 |
mstore(0x20, 0x80) |
||
| 10499 |
mstore(0x40, p1) |
||
| 10500 |
mstore(0x60, p2) |
||
| 10501 |
mstore(0x80, 0xc0) |
||
| 10502 |
writeString(0xa0, p0) |
||
| 10503 |
writeString(0xe0, p3) |
||
| 10504 |
} |
||
| 10505 |
_sendLogPayload(0x1c, 0x104); |
||
| 10506 |
assembly {
|
||
| 10507 |
mstore(0x00, m0) |
||
| 10508 |
mstore(0x20, m1) |
||
| 10509 |
mstore(0x40, m2) |
||
| 10510 |
mstore(0x60, m3) |
||
| 10511 |
mstore(0x80, m4) |
||
| 10512 |
mstore(0xa0, m5) |
||
| 10513 |
mstore(0xc0, m6) |
||
| 10514 |
mstore(0xe0, m7) |
||
| 10515 |
mstore(0x100, m8) |
||
| 10516 |
} |
||
| 10517 |
} |
||
| 10518 | |||
| 10519 |
function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {
|
||
| 10520 |
bytes32 m0; |
||
| 10521 |
bytes32 m1; |
||
| 10522 |
bytes32 m2; |
||
| 10523 |
bytes32 m3; |
||
| 10524 |
bytes32 m4; |
||
| 10525 |
bytes32 m5; |
||
| 10526 |
bytes32 m6; |
||
| 10527 |
assembly {
|
||
| 10528 |
function writeString(pos, w) {
|
||
| 10529 |
let length := 0 |
||
| 10530 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10531 |
mstore(pos, length) |
||
| 10532 |
let shift := sub(256, shl(3, length)) |
||
| 10533 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10534 |
} |
||
| 10535 |
m0 := mload(0x00) |
||
| 10536 |
m1 := mload(0x20) |
||
| 10537 |
m2 := mload(0x40) |
||
| 10538 |
m3 := mload(0x60) |
||
| 10539 |
m4 := mload(0x80) |
||
| 10540 |
m5 := mload(0xa0) |
||
| 10541 |
m6 := mload(0xc0) |
||
| 10542 |
// Selector of `log(string,address,uint256,address)`. |
||
| 10543 |
mstore(0x00, 0x63fb8bc5) |
||
| 10544 |
mstore(0x20, 0x80) |
||
| 10545 |
mstore(0x40, p1) |
||
| 10546 |
mstore(0x60, p2) |
||
| 10547 |
mstore(0x80, p3) |
||
| 10548 |
writeString(0xa0, p0) |
||
| 10549 |
} |
||
| 10550 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10551 |
assembly {
|
||
| 10552 |
mstore(0x00, m0) |
||
| 10553 |
mstore(0x20, m1) |
||
| 10554 |
mstore(0x40, m2) |
||
| 10555 |
mstore(0x60, m3) |
||
| 10556 |
mstore(0x80, m4) |
||
| 10557 |
mstore(0xa0, m5) |
||
| 10558 |
mstore(0xc0, m6) |
||
| 10559 |
} |
||
| 10560 |
} |
||
| 10561 | |||
| 10562 |
function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {
|
||
| 10563 |
bytes32 m0; |
||
| 10564 |
bytes32 m1; |
||
| 10565 |
bytes32 m2; |
||
| 10566 |
bytes32 m3; |
||
| 10567 |
bytes32 m4; |
||
| 10568 |
bytes32 m5; |
||
| 10569 |
bytes32 m6; |
||
| 10570 |
assembly {
|
||
| 10571 |
function writeString(pos, w) {
|
||
| 10572 |
let length := 0 |
||
| 10573 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10574 |
mstore(pos, length) |
||
| 10575 |
let shift := sub(256, shl(3, length)) |
||
| 10576 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10577 |
} |
||
| 10578 |
m0 := mload(0x00) |
||
| 10579 |
m1 := mload(0x20) |
||
| 10580 |
m2 := mload(0x40) |
||
| 10581 |
m3 := mload(0x60) |
||
| 10582 |
m4 := mload(0x80) |
||
| 10583 |
m5 := mload(0xa0) |
||
| 10584 |
m6 := mload(0xc0) |
||
| 10585 |
// Selector of `log(string,address,uint256,bool)`. |
||
| 10586 |
mstore(0x00, 0xfc4845f0) |
||
| 10587 |
mstore(0x20, 0x80) |
||
| 10588 |
mstore(0x40, p1) |
||
| 10589 |
mstore(0x60, p2) |
||
| 10590 |
mstore(0x80, p3) |
||
| 10591 |
writeString(0xa0, p0) |
||
| 10592 |
} |
||
| 10593 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10594 |
assembly {
|
||
| 10595 |
mstore(0x00, m0) |
||
| 10596 |
mstore(0x20, m1) |
||
| 10597 |
mstore(0x40, m2) |
||
| 10598 |
mstore(0x60, m3) |
||
| 10599 |
mstore(0x80, m4) |
||
| 10600 |
mstore(0xa0, m5) |
||
| 10601 |
mstore(0xc0, m6) |
||
| 10602 |
} |
||
| 10603 |
} |
||
| 10604 | |||
| 10605 |
function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {
|
||
| 10606 |
bytes32 m0; |
||
| 10607 |
bytes32 m1; |
||
| 10608 |
bytes32 m2; |
||
| 10609 |
bytes32 m3; |
||
| 10610 |
bytes32 m4; |
||
| 10611 |
bytes32 m5; |
||
| 10612 |
bytes32 m6; |
||
| 10613 |
assembly {
|
||
| 10614 |
function writeString(pos, w) {
|
||
| 10615 |
let length := 0 |
||
| 10616 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10617 |
mstore(pos, length) |
||
| 10618 |
let shift := sub(256, shl(3, length)) |
||
| 10619 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10620 |
} |
||
| 10621 |
m0 := mload(0x00) |
||
| 10622 |
m1 := mload(0x20) |
||
| 10623 |
m2 := mload(0x40) |
||
| 10624 |
m3 := mload(0x60) |
||
| 10625 |
m4 := mload(0x80) |
||
| 10626 |
m5 := mload(0xa0) |
||
| 10627 |
m6 := mload(0xc0) |
||
| 10628 |
// Selector of `log(string,address,uint256,uint256)`. |
||
| 10629 |
mstore(0x00, 0xf8f51b1e) |
||
| 10630 |
mstore(0x20, 0x80) |
||
| 10631 |
mstore(0x40, p1) |
||
| 10632 |
mstore(0x60, p2) |
||
| 10633 |
mstore(0x80, p3) |
||
| 10634 |
writeString(0xa0, p0) |
||
| 10635 |
} |
||
| 10636 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10637 |
assembly {
|
||
| 10638 |
mstore(0x00, m0) |
||
| 10639 |
mstore(0x20, m1) |
||
| 10640 |
mstore(0x40, m2) |
||
| 10641 |
mstore(0x60, m3) |
||
| 10642 |
mstore(0x80, m4) |
||
| 10643 |
mstore(0xa0, m5) |
||
| 10644 |
mstore(0xc0, m6) |
||
| 10645 |
} |
||
| 10646 |
} |
||
| 10647 | |||
| 10648 |
function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 10649 |
bytes32 m0; |
||
| 10650 |
bytes32 m1; |
||
| 10651 |
bytes32 m2; |
||
| 10652 |
bytes32 m3; |
||
| 10653 |
bytes32 m4; |
||
| 10654 |
bytes32 m5; |
||
| 10655 |
bytes32 m6; |
||
| 10656 |
bytes32 m7; |
||
| 10657 |
bytes32 m8; |
||
| 10658 |
assembly {
|
||
| 10659 |
function writeString(pos, w) {
|
||
| 10660 |
let length := 0 |
||
| 10661 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10662 |
mstore(pos, length) |
||
| 10663 |
let shift := sub(256, shl(3, length)) |
||
| 10664 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10665 |
} |
||
| 10666 |
m0 := mload(0x00) |
||
| 10667 |
m1 := mload(0x20) |
||
| 10668 |
m2 := mload(0x40) |
||
| 10669 |
m3 := mload(0x60) |
||
| 10670 |
m4 := mload(0x80) |
||
| 10671 |
m5 := mload(0xa0) |
||
| 10672 |
m6 := mload(0xc0) |
||
| 10673 |
m7 := mload(0xe0) |
||
| 10674 |
m8 := mload(0x100) |
||
| 10675 |
// Selector of `log(string,address,uint256,string)`. |
||
| 10676 |
mstore(0x00, 0x5a477632) |
||
| 10677 |
mstore(0x20, 0x80) |
||
| 10678 |
mstore(0x40, p1) |
||
| 10679 |
mstore(0x60, p2) |
||
| 10680 |
mstore(0x80, 0xc0) |
||
| 10681 |
writeString(0xa0, p0) |
||
| 10682 |
writeString(0xe0, p3) |
||
| 10683 |
} |
||
| 10684 |
_sendLogPayload(0x1c, 0x104); |
||
| 10685 |
assembly {
|
||
| 10686 |
mstore(0x00, m0) |
||
| 10687 |
mstore(0x20, m1) |
||
| 10688 |
mstore(0x40, m2) |
||
| 10689 |
mstore(0x60, m3) |
||
| 10690 |
mstore(0x80, m4) |
||
| 10691 |
mstore(0xa0, m5) |
||
| 10692 |
mstore(0xc0, m6) |
||
| 10693 |
mstore(0xe0, m7) |
||
| 10694 |
mstore(0x100, m8) |
||
| 10695 |
} |
||
| 10696 |
} |
||
| 10697 | |||
| 10698 |
function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {
|
||
| 10699 |
bytes32 m0; |
||
| 10700 |
bytes32 m1; |
||
| 10701 |
bytes32 m2; |
||
| 10702 |
bytes32 m3; |
||
| 10703 |
bytes32 m4; |
||
| 10704 |
bytes32 m5; |
||
| 10705 |
bytes32 m6; |
||
| 10706 |
bytes32 m7; |
||
| 10707 |
bytes32 m8; |
||
| 10708 |
assembly {
|
||
| 10709 |
function writeString(pos, w) {
|
||
| 10710 |
let length := 0 |
||
| 10711 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10712 |
mstore(pos, length) |
||
| 10713 |
let shift := sub(256, shl(3, length)) |
||
| 10714 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10715 |
} |
||
| 10716 |
m0 := mload(0x00) |
||
| 10717 |
m1 := mload(0x20) |
||
| 10718 |
m2 := mload(0x40) |
||
| 10719 |
m3 := mload(0x60) |
||
| 10720 |
m4 := mload(0x80) |
||
| 10721 |
m5 := mload(0xa0) |
||
| 10722 |
m6 := mload(0xc0) |
||
| 10723 |
m7 := mload(0xe0) |
||
| 10724 |
m8 := mload(0x100) |
||
| 10725 |
// Selector of `log(string,address,string,address)`. |
||
| 10726 |
mstore(0x00, 0xaabc9a31) |
||
| 10727 |
mstore(0x20, 0x80) |
||
| 10728 |
mstore(0x40, p1) |
||
| 10729 |
mstore(0x60, 0xc0) |
||
| 10730 |
mstore(0x80, p3) |
||
| 10731 |
writeString(0xa0, p0) |
||
| 10732 |
writeString(0xe0, p2) |
||
| 10733 |
} |
||
| 10734 |
_sendLogPayload(0x1c, 0x104); |
||
| 10735 |
assembly {
|
||
| 10736 |
mstore(0x00, m0) |
||
| 10737 |
mstore(0x20, m1) |
||
| 10738 |
mstore(0x40, m2) |
||
| 10739 |
mstore(0x60, m3) |
||
| 10740 |
mstore(0x80, m4) |
||
| 10741 |
mstore(0xa0, m5) |
||
| 10742 |
mstore(0xc0, m6) |
||
| 10743 |
mstore(0xe0, m7) |
||
| 10744 |
mstore(0x100, m8) |
||
| 10745 |
} |
||
| 10746 |
} |
||
| 10747 | |||
| 10748 |
function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {
|
||
| 10749 |
bytes32 m0; |
||
| 10750 |
bytes32 m1; |
||
| 10751 |
bytes32 m2; |
||
| 10752 |
bytes32 m3; |
||
| 10753 |
bytes32 m4; |
||
| 10754 |
bytes32 m5; |
||
| 10755 |
bytes32 m6; |
||
| 10756 |
bytes32 m7; |
||
| 10757 |
bytes32 m8; |
||
| 10758 |
assembly {
|
||
| 10759 |
function writeString(pos, w) {
|
||
| 10760 |
let length := 0 |
||
| 10761 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10762 |
mstore(pos, length) |
||
| 10763 |
let shift := sub(256, shl(3, length)) |
||
| 10764 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10765 |
} |
||
| 10766 |
m0 := mload(0x00) |
||
| 10767 |
m1 := mload(0x20) |
||
| 10768 |
m2 := mload(0x40) |
||
| 10769 |
m3 := mload(0x60) |
||
| 10770 |
m4 := mload(0x80) |
||
| 10771 |
m5 := mload(0xa0) |
||
| 10772 |
m6 := mload(0xc0) |
||
| 10773 |
m7 := mload(0xe0) |
||
| 10774 |
m8 := mload(0x100) |
||
| 10775 |
// Selector of `log(string,address,string,bool)`. |
||
| 10776 |
mstore(0x00, 0x5f15d28c) |
||
| 10777 |
mstore(0x20, 0x80) |
||
| 10778 |
mstore(0x40, p1) |
||
| 10779 |
mstore(0x60, 0xc0) |
||
| 10780 |
mstore(0x80, p3) |
||
| 10781 |
writeString(0xa0, p0) |
||
| 10782 |
writeString(0xe0, p2) |
||
| 10783 |
} |
||
| 10784 |
_sendLogPayload(0x1c, 0x104); |
||
| 10785 |
assembly {
|
||
| 10786 |
mstore(0x00, m0) |
||
| 10787 |
mstore(0x20, m1) |
||
| 10788 |
mstore(0x40, m2) |
||
| 10789 |
mstore(0x60, m3) |
||
| 10790 |
mstore(0x80, m4) |
||
| 10791 |
mstore(0xa0, m5) |
||
| 10792 |
mstore(0xc0, m6) |
||
| 10793 |
mstore(0xe0, m7) |
||
| 10794 |
mstore(0x100, m8) |
||
| 10795 |
} |
||
| 10796 |
} |
||
| 10797 | |||
| 10798 |
function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 10799 |
bytes32 m0; |
||
| 10800 |
bytes32 m1; |
||
| 10801 |
bytes32 m2; |
||
| 10802 |
bytes32 m3; |
||
| 10803 |
bytes32 m4; |
||
| 10804 |
bytes32 m5; |
||
| 10805 |
bytes32 m6; |
||
| 10806 |
bytes32 m7; |
||
| 10807 |
bytes32 m8; |
||
| 10808 |
assembly {
|
||
| 10809 |
function writeString(pos, w) {
|
||
| 10810 |
let length := 0 |
||
| 10811 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10812 |
mstore(pos, length) |
||
| 10813 |
let shift := sub(256, shl(3, length)) |
||
| 10814 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10815 |
} |
||
| 10816 |
m0 := mload(0x00) |
||
| 10817 |
m1 := mload(0x20) |
||
| 10818 |
m2 := mload(0x40) |
||
| 10819 |
m3 := mload(0x60) |
||
| 10820 |
m4 := mload(0x80) |
||
| 10821 |
m5 := mload(0xa0) |
||
| 10822 |
m6 := mload(0xc0) |
||
| 10823 |
m7 := mload(0xe0) |
||
| 10824 |
m8 := mload(0x100) |
||
| 10825 |
// Selector of `log(string,address,string,uint256)`. |
||
| 10826 |
mstore(0x00, 0x91d1112e) |
||
| 10827 |
mstore(0x20, 0x80) |
||
| 10828 |
mstore(0x40, p1) |
||
| 10829 |
mstore(0x60, 0xc0) |
||
| 10830 |
mstore(0x80, p3) |
||
| 10831 |
writeString(0xa0, p0) |
||
| 10832 |
writeString(0xe0, p2) |
||
| 10833 |
} |
||
| 10834 |
_sendLogPayload(0x1c, 0x104); |
||
| 10835 |
assembly {
|
||
| 10836 |
mstore(0x00, m0) |
||
| 10837 |
mstore(0x20, m1) |
||
| 10838 |
mstore(0x40, m2) |
||
| 10839 |
mstore(0x60, m3) |
||
| 10840 |
mstore(0x80, m4) |
||
| 10841 |
mstore(0xa0, m5) |
||
| 10842 |
mstore(0xc0, m6) |
||
| 10843 |
mstore(0xe0, m7) |
||
| 10844 |
mstore(0x100, m8) |
||
| 10845 |
} |
||
| 10846 |
} |
||
| 10847 | |||
| 10848 |
function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 10849 |
bytes32 m0; |
||
| 10850 |
bytes32 m1; |
||
| 10851 |
bytes32 m2; |
||
| 10852 |
bytes32 m3; |
||
| 10853 |
bytes32 m4; |
||
| 10854 |
bytes32 m5; |
||
| 10855 |
bytes32 m6; |
||
| 10856 |
bytes32 m7; |
||
| 10857 |
bytes32 m8; |
||
| 10858 |
bytes32 m9; |
||
| 10859 |
bytes32 m10; |
||
| 10860 |
assembly {
|
||
| 10861 |
function writeString(pos, w) {
|
||
| 10862 |
let length := 0 |
||
| 10863 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10864 |
mstore(pos, length) |
||
| 10865 |
let shift := sub(256, shl(3, length)) |
||
| 10866 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10867 |
} |
||
| 10868 |
m0 := mload(0x00) |
||
| 10869 |
m1 := mload(0x20) |
||
| 10870 |
m2 := mload(0x40) |
||
| 10871 |
m3 := mload(0x60) |
||
| 10872 |
m4 := mload(0x80) |
||
| 10873 |
m5 := mload(0xa0) |
||
| 10874 |
m6 := mload(0xc0) |
||
| 10875 |
m7 := mload(0xe0) |
||
| 10876 |
m8 := mload(0x100) |
||
| 10877 |
m9 := mload(0x120) |
||
| 10878 |
m10 := mload(0x140) |
||
| 10879 |
// Selector of `log(string,address,string,string)`. |
||
| 10880 |
mstore(0x00, 0x245986f2) |
||
| 10881 |
mstore(0x20, 0x80) |
||
| 10882 |
mstore(0x40, p1) |
||
| 10883 |
mstore(0x60, 0xc0) |
||
| 10884 |
mstore(0x80, 0x100) |
||
| 10885 |
writeString(0xa0, p0) |
||
| 10886 |
writeString(0xe0, p2) |
||
| 10887 |
writeString(0x120, p3) |
||
| 10888 |
} |
||
| 10889 |
_sendLogPayload(0x1c, 0x144); |
||
| 10890 |
assembly {
|
||
| 10891 |
mstore(0x00, m0) |
||
| 10892 |
mstore(0x20, m1) |
||
| 10893 |
mstore(0x40, m2) |
||
| 10894 |
mstore(0x60, m3) |
||
| 10895 |
mstore(0x80, m4) |
||
| 10896 |
mstore(0xa0, m5) |
||
| 10897 |
mstore(0xc0, m6) |
||
| 10898 |
mstore(0xe0, m7) |
||
| 10899 |
mstore(0x100, m8) |
||
| 10900 |
mstore(0x120, m9) |
||
| 10901 |
mstore(0x140, m10) |
||
| 10902 |
} |
||
| 10903 |
} |
||
| 10904 | |||
| 10905 |
function log(bytes32 p0, bool p1, address p2, address p3) internal pure {
|
||
| 10906 |
bytes32 m0; |
||
| 10907 |
bytes32 m1; |
||
| 10908 |
bytes32 m2; |
||
| 10909 |
bytes32 m3; |
||
| 10910 |
bytes32 m4; |
||
| 10911 |
bytes32 m5; |
||
| 10912 |
bytes32 m6; |
||
| 10913 |
assembly {
|
||
| 10914 |
function writeString(pos, w) {
|
||
| 10915 |
let length := 0 |
||
| 10916 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10917 |
mstore(pos, length) |
||
| 10918 |
let shift := sub(256, shl(3, length)) |
||
| 10919 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10920 |
} |
||
| 10921 |
m0 := mload(0x00) |
||
| 10922 |
m1 := mload(0x20) |
||
| 10923 |
m2 := mload(0x40) |
||
| 10924 |
m3 := mload(0x60) |
||
| 10925 |
m4 := mload(0x80) |
||
| 10926 |
m5 := mload(0xa0) |
||
| 10927 |
m6 := mload(0xc0) |
||
| 10928 |
// Selector of `log(string,bool,address,address)`. |
||
| 10929 |
mstore(0x00, 0x33e9dd1d) |
||
| 10930 |
mstore(0x20, 0x80) |
||
| 10931 |
mstore(0x40, p1) |
||
| 10932 |
mstore(0x60, p2) |
||
| 10933 |
mstore(0x80, p3) |
||
| 10934 |
writeString(0xa0, p0) |
||
| 10935 |
} |
||
| 10936 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10937 |
assembly {
|
||
| 10938 |
mstore(0x00, m0) |
||
| 10939 |
mstore(0x20, m1) |
||
| 10940 |
mstore(0x40, m2) |
||
| 10941 |
mstore(0x60, m3) |
||
| 10942 |
mstore(0x80, m4) |
||
| 10943 |
mstore(0xa0, m5) |
||
| 10944 |
mstore(0xc0, m6) |
||
| 10945 |
} |
||
| 10946 |
} |
||
| 10947 | |||
| 10948 |
function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {
|
||
| 10949 |
bytes32 m0; |
||
| 10950 |
bytes32 m1; |
||
| 10951 |
bytes32 m2; |
||
| 10952 |
bytes32 m3; |
||
| 10953 |
bytes32 m4; |
||
| 10954 |
bytes32 m5; |
||
| 10955 |
bytes32 m6; |
||
| 10956 |
assembly {
|
||
| 10957 |
function writeString(pos, w) {
|
||
| 10958 |
let length := 0 |
||
| 10959 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 10960 |
mstore(pos, length) |
||
| 10961 |
let shift := sub(256, shl(3, length)) |
||
| 10962 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 10963 |
} |
||
| 10964 |
m0 := mload(0x00) |
||
| 10965 |
m1 := mload(0x20) |
||
| 10966 |
m2 := mload(0x40) |
||
| 10967 |
m3 := mload(0x60) |
||
| 10968 |
m4 := mload(0x80) |
||
| 10969 |
m5 := mload(0xa0) |
||
| 10970 |
m6 := mload(0xc0) |
||
| 10971 |
// Selector of `log(string,bool,address,bool)`. |
||
| 10972 |
mstore(0x00, 0x958c28c6) |
||
| 10973 |
mstore(0x20, 0x80) |
||
| 10974 |
mstore(0x40, p1) |
||
| 10975 |
mstore(0x60, p2) |
||
| 10976 |
mstore(0x80, p3) |
||
| 10977 |
writeString(0xa0, p0) |
||
| 10978 |
} |
||
| 10979 |
_sendLogPayload(0x1c, 0xc4); |
||
| 10980 |
assembly {
|
||
| 10981 |
mstore(0x00, m0) |
||
| 10982 |
mstore(0x20, m1) |
||
| 10983 |
mstore(0x40, m2) |
||
| 10984 |
mstore(0x60, m3) |
||
| 10985 |
mstore(0x80, m4) |
||
| 10986 |
mstore(0xa0, m5) |
||
| 10987 |
mstore(0xc0, m6) |
||
| 10988 |
} |
||
| 10989 |
} |
||
| 10990 | |||
| 10991 |
function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {
|
||
| 10992 |
bytes32 m0; |
||
| 10993 |
bytes32 m1; |
||
| 10994 |
bytes32 m2; |
||
| 10995 |
bytes32 m3; |
||
| 10996 |
bytes32 m4; |
||
| 10997 |
bytes32 m5; |
||
| 10998 |
bytes32 m6; |
||
| 10999 |
assembly {
|
||
| 11000 |
function writeString(pos, w) {
|
||
| 11001 |
let length := 0 |
||
| 11002 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11003 |
mstore(pos, length) |
||
| 11004 |
let shift := sub(256, shl(3, length)) |
||
| 11005 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11006 |
} |
||
| 11007 |
m0 := mload(0x00) |
||
| 11008 |
m1 := mload(0x20) |
||
| 11009 |
m2 := mload(0x40) |
||
| 11010 |
m3 := mload(0x60) |
||
| 11011 |
m4 := mload(0x80) |
||
| 11012 |
m5 := mload(0xa0) |
||
| 11013 |
m6 := mload(0xc0) |
||
| 11014 |
// Selector of `log(string,bool,address,uint256)`. |
||
| 11015 |
mstore(0x00, 0x5d08bb05) |
||
| 11016 |
mstore(0x20, 0x80) |
||
| 11017 |
mstore(0x40, p1) |
||
| 11018 |
mstore(0x60, p2) |
||
| 11019 |
mstore(0x80, p3) |
||
| 11020 |
writeString(0xa0, p0) |
||
| 11021 |
} |
||
| 11022 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11023 |
assembly {
|
||
| 11024 |
mstore(0x00, m0) |
||
| 11025 |
mstore(0x20, m1) |
||
| 11026 |
mstore(0x40, m2) |
||
| 11027 |
mstore(0x60, m3) |
||
| 11028 |
mstore(0x80, m4) |
||
| 11029 |
mstore(0xa0, m5) |
||
| 11030 |
mstore(0xc0, m6) |
||
| 11031 |
} |
||
| 11032 |
} |
||
| 11033 | |||
| 11034 |
function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {
|
||
| 11035 |
bytes32 m0; |
||
| 11036 |
bytes32 m1; |
||
| 11037 |
bytes32 m2; |
||
| 11038 |
bytes32 m3; |
||
| 11039 |
bytes32 m4; |
||
| 11040 |
bytes32 m5; |
||
| 11041 |
bytes32 m6; |
||
| 11042 |
bytes32 m7; |
||
| 11043 |
bytes32 m8; |
||
| 11044 |
assembly {
|
||
| 11045 |
function writeString(pos, w) {
|
||
| 11046 |
let length := 0 |
||
| 11047 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11048 |
mstore(pos, length) |
||
| 11049 |
let shift := sub(256, shl(3, length)) |
||
| 11050 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11051 |
} |
||
| 11052 |
m0 := mload(0x00) |
||
| 11053 |
m1 := mload(0x20) |
||
| 11054 |
m2 := mload(0x40) |
||
| 11055 |
m3 := mload(0x60) |
||
| 11056 |
m4 := mload(0x80) |
||
| 11057 |
m5 := mload(0xa0) |
||
| 11058 |
m6 := mload(0xc0) |
||
| 11059 |
m7 := mload(0xe0) |
||
| 11060 |
m8 := mload(0x100) |
||
| 11061 |
// Selector of `log(string,bool,address,string)`. |
||
| 11062 |
mstore(0x00, 0x2d8e33a4) |
||
| 11063 |
mstore(0x20, 0x80) |
||
| 11064 |
mstore(0x40, p1) |
||
| 11065 |
mstore(0x60, p2) |
||
| 11066 |
mstore(0x80, 0xc0) |
||
| 11067 |
writeString(0xa0, p0) |
||
| 11068 |
writeString(0xe0, p3) |
||
| 11069 |
} |
||
| 11070 |
_sendLogPayload(0x1c, 0x104); |
||
| 11071 |
assembly {
|
||
| 11072 |
mstore(0x00, m0) |
||
| 11073 |
mstore(0x20, m1) |
||
| 11074 |
mstore(0x40, m2) |
||
| 11075 |
mstore(0x60, m3) |
||
| 11076 |
mstore(0x80, m4) |
||
| 11077 |
mstore(0xa0, m5) |
||
| 11078 |
mstore(0xc0, m6) |
||
| 11079 |
mstore(0xe0, m7) |
||
| 11080 |
mstore(0x100, m8) |
||
| 11081 |
} |
||
| 11082 |
} |
||
| 11083 | |||
| 11084 |
function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {
|
||
| 11085 |
bytes32 m0; |
||
| 11086 |
bytes32 m1; |
||
| 11087 |
bytes32 m2; |
||
| 11088 |
bytes32 m3; |
||
| 11089 |
bytes32 m4; |
||
| 11090 |
bytes32 m5; |
||
| 11091 |
bytes32 m6; |
||
| 11092 |
assembly {
|
||
| 11093 |
function writeString(pos, w) {
|
||
| 11094 |
let length := 0 |
||
| 11095 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11096 |
mstore(pos, length) |
||
| 11097 |
let shift := sub(256, shl(3, length)) |
||
| 11098 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11099 |
} |
||
| 11100 |
m0 := mload(0x00) |
||
| 11101 |
m1 := mload(0x20) |
||
| 11102 |
m2 := mload(0x40) |
||
| 11103 |
m3 := mload(0x60) |
||
| 11104 |
m4 := mload(0x80) |
||
| 11105 |
m5 := mload(0xa0) |
||
| 11106 |
m6 := mload(0xc0) |
||
| 11107 |
// Selector of `log(string,bool,bool,address)`. |
||
| 11108 |
mstore(0x00, 0x7190a529) |
||
| 11109 |
mstore(0x20, 0x80) |
||
| 11110 |
mstore(0x40, p1) |
||
| 11111 |
mstore(0x60, p2) |
||
| 11112 |
mstore(0x80, p3) |
||
| 11113 |
writeString(0xa0, p0) |
||
| 11114 |
} |
||
| 11115 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11116 |
assembly {
|
||
| 11117 |
mstore(0x00, m0) |
||
| 11118 |
mstore(0x20, m1) |
||
| 11119 |
mstore(0x40, m2) |
||
| 11120 |
mstore(0x60, m3) |
||
| 11121 |
mstore(0x80, m4) |
||
| 11122 |
mstore(0xa0, m5) |
||
| 11123 |
mstore(0xc0, m6) |
||
| 11124 |
} |
||
| 11125 |
} |
||
| 11126 | |||
| 11127 |
function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {
|
||
| 11128 |
bytes32 m0; |
||
| 11129 |
bytes32 m1; |
||
| 11130 |
bytes32 m2; |
||
| 11131 |
bytes32 m3; |
||
| 11132 |
bytes32 m4; |
||
| 11133 |
bytes32 m5; |
||
| 11134 |
bytes32 m6; |
||
| 11135 |
assembly {
|
||
| 11136 |
function writeString(pos, w) {
|
||
| 11137 |
let length := 0 |
||
| 11138 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11139 |
mstore(pos, length) |
||
| 11140 |
let shift := sub(256, shl(3, length)) |
||
| 11141 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11142 |
} |
||
| 11143 |
m0 := mload(0x00) |
||
| 11144 |
m1 := mload(0x20) |
||
| 11145 |
m2 := mload(0x40) |
||
| 11146 |
m3 := mload(0x60) |
||
| 11147 |
m4 := mload(0x80) |
||
| 11148 |
m5 := mload(0xa0) |
||
| 11149 |
m6 := mload(0xc0) |
||
| 11150 |
// Selector of `log(string,bool,bool,bool)`. |
||
| 11151 |
mstore(0x00, 0x895af8c5) |
||
| 11152 |
mstore(0x20, 0x80) |
||
| 11153 |
mstore(0x40, p1) |
||
| 11154 |
mstore(0x60, p2) |
||
| 11155 |
mstore(0x80, p3) |
||
| 11156 |
writeString(0xa0, p0) |
||
| 11157 |
} |
||
| 11158 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11159 |
assembly {
|
||
| 11160 |
mstore(0x00, m0) |
||
| 11161 |
mstore(0x20, m1) |
||
| 11162 |
mstore(0x40, m2) |
||
| 11163 |
mstore(0x60, m3) |
||
| 11164 |
mstore(0x80, m4) |
||
| 11165 |
mstore(0xa0, m5) |
||
| 11166 |
mstore(0xc0, m6) |
||
| 11167 |
} |
||
| 11168 |
} |
||
| 11169 | |||
| 11170 |
function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {
|
||
| 11171 |
bytes32 m0; |
||
| 11172 |
bytes32 m1; |
||
| 11173 |
bytes32 m2; |
||
| 11174 |
bytes32 m3; |
||
| 11175 |
bytes32 m4; |
||
| 11176 |
bytes32 m5; |
||
| 11177 |
bytes32 m6; |
||
| 11178 |
assembly {
|
||
| 11179 |
function writeString(pos, w) {
|
||
| 11180 |
let length := 0 |
||
| 11181 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11182 |
mstore(pos, length) |
||
| 11183 |
let shift := sub(256, shl(3, length)) |
||
| 11184 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11185 |
} |
||
| 11186 |
m0 := mload(0x00) |
||
| 11187 |
m1 := mload(0x20) |
||
| 11188 |
m2 := mload(0x40) |
||
| 11189 |
m3 := mload(0x60) |
||
| 11190 |
m4 := mload(0x80) |
||
| 11191 |
m5 := mload(0xa0) |
||
| 11192 |
m6 := mload(0xc0) |
||
| 11193 |
// Selector of `log(string,bool,bool,uint256)`. |
||
| 11194 |
mstore(0x00, 0x8e3f78a9) |
||
| 11195 |
mstore(0x20, 0x80) |
||
| 11196 |
mstore(0x40, p1) |
||
| 11197 |
mstore(0x60, p2) |
||
| 11198 |
mstore(0x80, p3) |
||
| 11199 |
writeString(0xa0, p0) |
||
| 11200 |
} |
||
| 11201 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11202 |
assembly {
|
||
| 11203 |
mstore(0x00, m0) |
||
| 11204 |
mstore(0x20, m1) |
||
| 11205 |
mstore(0x40, m2) |
||
| 11206 |
mstore(0x60, m3) |
||
| 11207 |
mstore(0x80, m4) |
||
| 11208 |
mstore(0xa0, m5) |
||
| 11209 |
mstore(0xc0, m6) |
||
| 11210 |
} |
||
| 11211 |
} |
||
| 11212 | |||
| 11213 |
function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {
|
||
| 11214 |
bytes32 m0; |
||
| 11215 |
bytes32 m1; |
||
| 11216 |
bytes32 m2; |
||
| 11217 |
bytes32 m3; |
||
| 11218 |
bytes32 m4; |
||
| 11219 |
bytes32 m5; |
||
| 11220 |
bytes32 m6; |
||
| 11221 |
bytes32 m7; |
||
| 11222 |
bytes32 m8; |
||
| 11223 |
assembly {
|
||
| 11224 |
function writeString(pos, w) {
|
||
| 11225 |
let length := 0 |
||
| 11226 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11227 |
mstore(pos, length) |
||
| 11228 |
let shift := sub(256, shl(3, length)) |
||
| 11229 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11230 |
} |
||
| 11231 |
m0 := mload(0x00) |
||
| 11232 |
m1 := mload(0x20) |
||
| 11233 |
m2 := mload(0x40) |
||
| 11234 |
m3 := mload(0x60) |
||
| 11235 |
m4 := mload(0x80) |
||
| 11236 |
m5 := mload(0xa0) |
||
| 11237 |
m6 := mload(0xc0) |
||
| 11238 |
m7 := mload(0xe0) |
||
| 11239 |
m8 := mload(0x100) |
||
| 11240 |
// Selector of `log(string,bool,bool,string)`. |
||
| 11241 |
mstore(0x00, 0x9d22d5dd) |
||
| 11242 |
mstore(0x20, 0x80) |
||
| 11243 |
mstore(0x40, p1) |
||
| 11244 |
mstore(0x60, p2) |
||
| 11245 |
mstore(0x80, 0xc0) |
||
| 11246 |
writeString(0xa0, p0) |
||
| 11247 |
writeString(0xe0, p3) |
||
| 11248 |
} |
||
| 11249 |
_sendLogPayload(0x1c, 0x104); |
||
| 11250 |
assembly {
|
||
| 11251 |
mstore(0x00, m0) |
||
| 11252 |
mstore(0x20, m1) |
||
| 11253 |
mstore(0x40, m2) |
||
| 11254 |
mstore(0x60, m3) |
||
| 11255 |
mstore(0x80, m4) |
||
| 11256 |
mstore(0xa0, m5) |
||
| 11257 |
mstore(0xc0, m6) |
||
| 11258 |
mstore(0xe0, m7) |
||
| 11259 |
mstore(0x100, m8) |
||
| 11260 |
} |
||
| 11261 |
} |
||
| 11262 | |||
| 11263 |
function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {
|
||
| 11264 |
bytes32 m0; |
||
| 11265 |
bytes32 m1; |
||
| 11266 |
bytes32 m2; |
||
| 11267 |
bytes32 m3; |
||
| 11268 |
bytes32 m4; |
||
| 11269 |
bytes32 m5; |
||
| 11270 |
bytes32 m6; |
||
| 11271 |
assembly {
|
||
| 11272 |
function writeString(pos, w) {
|
||
| 11273 |
let length := 0 |
||
| 11274 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11275 |
mstore(pos, length) |
||
| 11276 |
let shift := sub(256, shl(3, length)) |
||
| 11277 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11278 |
} |
||
| 11279 |
m0 := mload(0x00) |
||
| 11280 |
m1 := mload(0x20) |
||
| 11281 |
m2 := mload(0x40) |
||
| 11282 |
m3 := mload(0x60) |
||
| 11283 |
m4 := mload(0x80) |
||
| 11284 |
m5 := mload(0xa0) |
||
| 11285 |
m6 := mload(0xc0) |
||
| 11286 |
// Selector of `log(string,bool,uint256,address)`. |
||
| 11287 |
mstore(0x00, 0x935e09bf) |
||
| 11288 |
mstore(0x20, 0x80) |
||
| 11289 |
mstore(0x40, p1) |
||
| 11290 |
mstore(0x60, p2) |
||
| 11291 |
mstore(0x80, p3) |
||
| 11292 |
writeString(0xa0, p0) |
||
| 11293 |
} |
||
| 11294 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11295 |
assembly {
|
||
| 11296 |
mstore(0x00, m0) |
||
| 11297 |
mstore(0x20, m1) |
||
| 11298 |
mstore(0x40, m2) |
||
| 11299 |
mstore(0x60, m3) |
||
| 11300 |
mstore(0x80, m4) |
||
| 11301 |
mstore(0xa0, m5) |
||
| 11302 |
mstore(0xc0, m6) |
||
| 11303 |
} |
||
| 11304 |
} |
||
| 11305 | |||
| 11306 |
function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {
|
||
| 11307 |
bytes32 m0; |
||
| 11308 |
bytes32 m1; |
||
| 11309 |
bytes32 m2; |
||
| 11310 |
bytes32 m3; |
||
| 11311 |
bytes32 m4; |
||
| 11312 |
bytes32 m5; |
||
| 11313 |
bytes32 m6; |
||
| 11314 |
assembly {
|
||
| 11315 |
function writeString(pos, w) {
|
||
| 11316 |
let length := 0 |
||
| 11317 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11318 |
mstore(pos, length) |
||
| 11319 |
let shift := sub(256, shl(3, length)) |
||
| 11320 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11321 |
} |
||
| 11322 |
m0 := mload(0x00) |
||
| 11323 |
m1 := mload(0x20) |
||
| 11324 |
m2 := mload(0x40) |
||
| 11325 |
m3 := mload(0x60) |
||
| 11326 |
m4 := mload(0x80) |
||
| 11327 |
m5 := mload(0xa0) |
||
| 11328 |
m6 := mload(0xc0) |
||
| 11329 |
// Selector of `log(string,bool,uint256,bool)`. |
||
| 11330 |
mstore(0x00, 0x8af7cf8a) |
||
| 11331 |
mstore(0x20, 0x80) |
||
| 11332 |
mstore(0x40, p1) |
||
| 11333 |
mstore(0x60, p2) |
||
| 11334 |
mstore(0x80, p3) |
||
| 11335 |
writeString(0xa0, p0) |
||
| 11336 |
} |
||
| 11337 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11338 |
assembly {
|
||
| 11339 |
mstore(0x00, m0) |
||
| 11340 |
mstore(0x20, m1) |
||
| 11341 |
mstore(0x40, m2) |
||
| 11342 |
mstore(0x60, m3) |
||
| 11343 |
mstore(0x80, m4) |
||
| 11344 |
mstore(0xa0, m5) |
||
| 11345 |
mstore(0xc0, m6) |
||
| 11346 |
} |
||
| 11347 |
} |
||
| 11348 | |||
| 11349 |
function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {
|
||
| 11350 |
bytes32 m0; |
||
| 11351 |
bytes32 m1; |
||
| 11352 |
bytes32 m2; |
||
| 11353 |
bytes32 m3; |
||
| 11354 |
bytes32 m4; |
||
| 11355 |
bytes32 m5; |
||
| 11356 |
bytes32 m6; |
||
| 11357 |
assembly {
|
||
| 11358 |
function writeString(pos, w) {
|
||
| 11359 |
let length := 0 |
||
| 11360 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11361 |
mstore(pos, length) |
||
| 11362 |
let shift := sub(256, shl(3, length)) |
||
| 11363 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11364 |
} |
||
| 11365 |
m0 := mload(0x00) |
||
| 11366 |
m1 := mload(0x20) |
||
| 11367 |
m2 := mload(0x40) |
||
| 11368 |
m3 := mload(0x60) |
||
| 11369 |
m4 := mload(0x80) |
||
| 11370 |
m5 := mload(0xa0) |
||
| 11371 |
m6 := mload(0xc0) |
||
| 11372 |
// Selector of `log(string,bool,uint256,uint256)`. |
||
| 11373 |
mstore(0x00, 0x64b5bb67) |
||
| 11374 |
mstore(0x20, 0x80) |
||
| 11375 |
mstore(0x40, p1) |
||
| 11376 |
mstore(0x60, p2) |
||
| 11377 |
mstore(0x80, p3) |
||
| 11378 |
writeString(0xa0, p0) |
||
| 11379 |
} |
||
| 11380 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11381 |
assembly {
|
||
| 11382 |
mstore(0x00, m0) |
||
| 11383 |
mstore(0x20, m1) |
||
| 11384 |
mstore(0x40, m2) |
||
| 11385 |
mstore(0x60, m3) |
||
| 11386 |
mstore(0x80, m4) |
||
| 11387 |
mstore(0xa0, m5) |
||
| 11388 |
mstore(0xc0, m6) |
||
| 11389 |
} |
||
| 11390 |
} |
||
| 11391 | |||
| 11392 |
function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 11393 |
bytes32 m0; |
||
| 11394 |
bytes32 m1; |
||
| 11395 |
bytes32 m2; |
||
| 11396 |
bytes32 m3; |
||
| 11397 |
bytes32 m4; |
||
| 11398 |
bytes32 m5; |
||
| 11399 |
bytes32 m6; |
||
| 11400 |
bytes32 m7; |
||
| 11401 |
bytes32 m8; |
||
| 11402 |
assembly {
|
||
| 11403 |
function writeString(pos, w) {
|
||
| 11404 |
let length := 0 |
||
| 11405 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11406 |
mstore(pos, length) |
||
| 11407 |
let shift := sub(256, shl(3, length)) |
||
| 11408 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11409 |
} |
||
| 11410 |
m0 := mload(0x00) |
||
| 11411 |
m1 := mload(0x20) |
||
| 11412 |
m2 := mload(0x40) |
||
| 11413 |
m3 := mload(0x60) |
||
| 11414 |
m4 := mload(0x80) |
||
| 11415 |
m5 := mload(0xa0) |
||
| 11416 |
m6 := mload(0xc0) |
||
| 11417 |
m7 := mload(0xe0) |
||
| 11418 |
m8 := mload(0x100) |
||
| 11419 |
// Selector of `log(string,bool,uint256,string)`. |
||
| 11420 |
mstore(0x00, 0x742d6ee7) |
||
| 11421 |
mstore(0x20, 0x80) |
||
| 11422 |
mstore(0x40, p1) |
||
| 11423 |
mstore(0x60, p2) |
||
| 11424 |
mstore(0x80, 0xc0) |
||
| 11425 |
writeString(0xa0, p0) |
||
| 11426 |
writeString(0xe0, p3) |
||
| 11427 |
} |
||
| 11428 |
_sendLogPayload(0x1c, 0x104); |
||
| 11429 |
assembly {
|
||
| 11430 |
mstore(0x00, m0) |
||
| 11431 |
mstore(0x20, m1) |
||
| 11432 |
mstore(0x40, m2) |
||
| 11433 |
mstore(0x60, m3) |
||
| 11434 |
mstore(0x80, m4) |
||
| 11435 |
mstore(0xa0, m5) |
||
| 11436 |
mstore(0xc0, m6) |
||
| 11437 |
mstore(0xe0, m7) |
||
| 11438 |
mstore(0x100, m8) |
||
| 11439 |
} |
||
| 11440 |
} |
||
| 11441 | |||
| 11442 |
function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {
|
||
| 11443 |
bytes32 m0; |
||
| 11444 |
bytes32 m1; |
||
| 11445 |
bytes32 m2; |
||
| 11446 |
bytes32 m3; |
||
| 11447 |
bytes32 m4; |
||
| 11448 |
bytes32 m5; |
||
| 11449 |
bytes32 m6; |
||
| 11450 |
bytes32 m7; |
||
| 11451 |
bytes32 m8; |
||
| 11452 |
assembly {
|
||
| 11453 |
function writeString(pos, w) {
|
||
| 11454 |
let length := 0 |
||
| 11455 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11456 |
mstore(pos, length) |
||
| 11457 |
let shift := sub(256, shl(3, length)) |
||
| 11458 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11459 |
} |
||
| 11460 |
m0 := mload(0x00) |
||
| 11461 |
m1 := mload(0x20) |
||
| 11462 |
m2 := mload(0x40) |
||
| 11463 |
m3 := mload(0x60) |
||
| 11464 |
m4 := mload(0x80) |
||
| 11465 |
m5 := mload(0xa0) |
||
| 11466 |
m6 := mload(0xc0) |
||
| 11467 |
m7 := mload(0xe0) |
||
| 11468 |
m8 := mload(0x100) |
||
| 11469 |
// Selector of `log(string,bool,string,address)`. |
||
| 11470 |
mstore(0x00, 0xe0625b29) |
||
| 11471 |
mstore(0x20, 0x80) |
||
| 11472 |
mstore(0x40, p1) |
||
| 11473 |
mstore(0x60, 0xc0) |
||
| 11474 |
mstore(0x80, p3) |
||
| 11475 |
writeString(0xa0, p0) |
||
| 11476 |
writeString(0xe0, p2) |
||
| 11477 |
} |
||
| 11478 |
_sendLogPayload(0x1c, 0x104); |
||
| 11479 |
assembly {
|
||
| 11480 |
mstore(0x00, m0) |
||
| 11481 |
mstore(0x20, m1) |
||
| 11482 |
mstore(0x40, m2) |
||
| 11483 |
mstore(0x60, m3) |
||
| 11484 |
mstore(0x80, m4) |
||
| 11485 |
mstore(0xa0, m5) |
||
| 11486 |
mstore(0xc0, m6) |
||
| 11487 |
mstore(0xe0, m7) |
||
| 11488 |
mstore(0x100, m8) |
||
| 11489 |
} |
||
| 11490 |
} |
||
| 11491 | |||
| 11492 |
function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {
|
||
| 11493 |
bytes32 m0; |
||
| 11494 |
bytes32 m1; |
||
| 11495 |
bytes32 m2; |
||
| 11496 |
bytes32 m3; |
||
| 11497 |
bytes32 m4; |
||
| 11498 |
bytes32 m5; |
||
| 11499 |
bytes32 m6; |
||
| 11500 |
bytes32 m7; |
||
| 11501 |
bytes32 m8; |
||
| 11502 |
assembly {
|
||
| 11503 |
function writeString(pos, w) {
|
||
| 11504 |
let length := 0 |
||
| 11505 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11506 |
mstore(pos, length) |
||
| 11507 |
let shift := sub(256, shl(3, length)) |
||
| 11508 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11509 |
} |
||
| 11510 |
m0 := mload(0x00) |
||
| 11511 |
m1 := mload(0x20) |
||
| 11512 |
m2 := mload(0x40) |
||
| 11513 |
m3 := mload(0x60) |
||
| 11514 |
m4 := mload(0x80) |
||
| 11515 |
m5 := mload(0xa0) |
||
| 11516 |
m6 := mload(0xc0) |
||
| 11517 |
m7 := mload(0xe0) |
||
| 11518 |
m8 := mload(0x100) |
||
| 11519 |
// Selector of `log(string,bool,string,bool)`. |
||
| 11520 |
mstore(0x00, 0x3f8a701d) |
||
| 11521 |
mstore(0x20, 0x80) |
||
| 11522 |
mstore(0x40, p1) |
||
| 11523 |
mstore(0x60, 0xc0) |
||
| 11524 |
mstore(0x80, p3) |
||
| 11525 |
writeString(0xa0, p0) |
||
| 11526 |
writeString(0xe0, p2) |
||
| 11527 |
} |
||
| 11528 |
_sendLogPayload(0x1c, 0x104); |
||
| 11529 |
assembly {
|
||
| 11530 |
mstore(0x00, m0) |
||
| 11531 |
mstore(0x20, m1) |
||
| 11532 |
mstore(0x40, m2) |
||
| 11533 |
mstore(0x60, m3) |
||
| 11534 |
mstore(0x80, m4) |
||
| 11535 |
mstore(0xa0, m5) |
||
| 11536 |
mstore(0xc0, m6) |
||
| 11537 |
mstore(0xe0, m7) |
||
| 11538 |
mstore(0x100, m8) |
||
| 11539 |
} |
||
| 11540 |
} |
||
| 11541 | |||
| 11542 |
function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 11543 |
bytes32 m0; |
||
| 11544 |
bytes32 m1; |
||
| 11545 |
bytes32 m2; |
||
| 11546 |
bytes32 m3; |
||
| 11547 |
bytes32 m4; |
||
| 11548 |
bytes32 m5; |
||
| 11549 |
bytes32 m6; |
||
| 11550 |
bytes32 m7; |
||
| 11551 |
bytes32 m8; |
||
| 11552 |
assembly {
|
||
| 11553 |
function writeString(pos, w) {
|
||
| 11554 |
let length := 0 |
||
| 11555 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11556 |
mstore(pos, length) |
||
| 11557 |
let shift := sub(256, shl(3, length)) |
||
| 11558 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11559 |
} |
||
| 11560 |
m0 := mload(0x00) |
||
| 11561 |
m1 := mload(0x20) |
||
| 11562 |
m2 := mload(0x40) |
||
| 11563 |
m3 := mload(0x60) |
||
| 11564 |
m4 := mload(0x80) |
||
| 11565 |
m5 := mload(0xa0) |
||
| 11566 |
m6 := mload(0xc0) |
||
| 11567 |
m7 := mload(0xe0) |
||
| 11568 |
m8 := mload(0x100) |
||
| 11569 |
// Selector of `log(string,bool,string,uint256)`. |
||
| 11570 |
mstore(0x00, 0x24f91465) |
||
| 11571 |
mstore(0x20, 0x80) |
||
| 11572 |
mstore(0x40, p1) |
||
| 11573 |
mstore(0x60, 0xc0) |
||
| 11574 |
mstore(0x80, p3) |
||
| 11575 |
writeString(0xa0, p0) |
||
| 11576 |
writeString(0xe0, p2) |
||
| 11577 |
} |
||
| 11578 |
_sendLogPayload(0x1c, 0x104); |
||
| 11579 |
assembly {
|
||
| 11580 |
mstore(0x00, m0) |
||
| 11581 |
mstore(0x20, m1) |
||
| 11582 |
mstore(0x40, m2) |
||
| 11583 |
mstore(0x60, m3) |
||
| 11584 |
mstore(0x80, m4) |
||
| 11585 |
mstore(0xa0, m5) |
||
| 11586 |
mstore(0xc0, m6) |
||
| 11587 |
mstore(0xe0, m7) |
||
| 11588 |
mstore(0x100, m8) |
||
| 11589 |
} |
||
| 11590 |
} |
||
| 11591 | |||
| 11592 |
function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 11593 |
bytes32 m0; |
||
| 11594 |
bytes32 m1; |
||
| 11595 |
bytes32 m2; |
||
| 11596 |
bytes32 m3; |
||
| 11597 |
bytes32 m4; |
||
| 11598 |
bytes32 m5; |
||
| 11599 |
bytes32 m6; |
||
| 11600 |
bytes32 m7; |
||
| 11601 |
bytes32 m8; |
||
| 11602 |
bytes32 m9; |
||
| 11603 |
bytes32 m10; |
||
| 11604 |
assembly {
|
||
| 11605 |
function writeString(pos, w) {
|
||
| 11606 |
let length := 0 |
||
| 11607 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11608 |
mstore(pos, length) |
||
| 11609 |
let shift := sub(256, shl(3, length)) |
||
| 11610 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11611 |
} |
||
| 11612 |
m0 := mload(0x00) |
||
| 11613 |
m1 := mload(0x20) |
||
| 11614 |
m2 := mload(0x40) |
||
| 11615 |
m3 := mload(0x60) |
||
| 11616 |
m4 := mload(0x80) |
||
| 11617 |
m5 := mload(0xa0) |
||
| 11618 |
m6 := mload(0xc0) |
||
| 11619 |
m7 := mload(0xe0) |
||
| 11620 |
m8 := mload(0x100) |
||
| 11621 |
m9 := mload(0x120) |
||
| 11622 |
m10 := mload(0x140) |
||
| 11623 |
// Selector of `log(string,bool,string,string)`. |
||
| 11624 |
mstore(0x00, 0xa826caeb) |
||
| 11625 |
mstore(0x20, 0x80) |
||
| 11626 |
mstore(0x40, p1) |
||
| 11627 |
mstore(0x60, 0xc0) |
||
| 11628 |
mstore(0x80, 0x100) |
||
| 11629 |
writeString(0xa0, p0) |
||
| 11630 |
writeString(0xe0, p2) |
||
| 11631 |
writeString(0x120, p3) |
||
| 11632 |
} |
||
| 11633 |
_sendLogPayload(0x1c, 0x144); |
||
| 11634 |
assembly {
|
||
| 11635 |
mstore(0x00, m0) |
||
| 11636 |
mstore(0x20, m1) |
||
| 11637 |
mstore(0x40, m2) |
||
| 11638 |
mstore(0x60, m3) |
||
| 11639 |
mstore(0x80, m4) |
||
| 11640 |
mstore(0xa0, m5) |
||
| 11641 |
mstore(0xc0, m6) |
||
| 11642 |
mstore(0xe0, m7) |
||
| 11643 |
mstore(0x100, m8) |
||
| 11644 |
mstore(0x120, m9) |
||
| 11645 |
mstore(0x140, m10) |
||
| 11646 |
} |
||
| 11647 |
} |
||
| 11648 | |||
| 11649 |
function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {
|
||
| 11650 |
bytes32 m0; |
||
| 11651 |
bytes32 m1; |
||
| 11652 |
bytes32 m2; |
||
| 11653 |
bytes32 m3; |
||
| 11654 |
bytes32 m4; |
||
| 11655 |
bytes32 m5; |
||
| 11656 |
bytes32 m6; |
||
| 11657 |
assembly {
|
||
| 11658 |
function writeString(pos, w) {
|
||
| 11659 |
let length := 0 |
||
| 11660 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11661 |
mstore(pos, length) |
||
| 11662 |
let shift := sub(256, shl(3, length)) |
||
| 11663 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11664 |
} |
||
| 11665 |
m0 := mload(0x00) |
||
| 11666 |
m1 := mload(0x20) |
||
| 11667 |
m2 := mload(0x40) |
||
| 11668 |
m3 := mload(0x60) |
||
| 11669 |
m4 := mload(0x80) |
||
| 11670 |
m5 := mload(0xa0) |
||
| 11671 |
m6 := mload(0xc0) |
||
| 11672 |
// Selector of `log(string,uint256,address,address)`. |
||
| 11673 |
mstore(0x00, 0x5ea2b7ae) |
||
| 11674 |
mstore(0x20, 0x80) |
||
| 11675 |
mstore(0x40, p1) |
||
| 11676 |
mstore(0x60, p2) |
||
| 11677 |
mstore(0x80, p3) |
||
| 11678 |
writeString(0xa0, p0) |
||
| 11679 |
} |
||
| 11680 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11681 |
assembly {
|
||
| 11682 |
mstore(0x00, m0) |
||
| 11683 |
mstore(0x20, m1) |
||
| 11684 |
mstore(0x40, m2) |
||
| 11685 |
mstore(0x60, m3) |
||
| 11686 |
mstore(0x80, m4) |
||
| 11687 |
mstore(0xa0, m5) |
||
| 11688 |
mstore(0xc0, m6) |
||
| 11689 |
} |
||
| 11690 |
} |
||
| 11691 | |||
| 11692 |
function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {
|
||
| 11693 |
bytes32 m0; |
||
| 11694 |
bytes32 m1; |
||
| 11695 |
bytes32 m2; |
||
| 11696 |
bytes32 m3; |
||
| 11697 |
bytes32 m4; |
||
| 11698 |
bytes32 m5; |
||
| 11699 |
bytes32 m6; |
||
| 11700 |
assembly {
|
||
| 11701 |
function writeString(pos, w) {
|
||
| 11702 |
let length := 0 |
||
| 11703 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11704 |
mstore(pos, length) |
||
| 11705 |
let shift := sub(256, shl(3, length)) |
||
| 11706 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11707 |
} |
||
| 11708 |
m0 := mload(0x00) |
||
| 11709 |
m1 := mload(0x20) |
||
| 11710 |
m2 := mload(0x40) |
||
| 11711 |
m3 := mload(0x60) |
||
| 11712 |
m4 := mload(0x80) |
||
| 11713 |
m5 := mload(0xa0) |
||
| 11714 |
m6 := mload(0xc0) |
||
| 11715 |
// Selector of `log(string,uint256,address,bool)`. |
||
| 11716 |
mstore(0x00, 0x82112a42) |
||
| 11717 |
mstore(0x20, 0x80) |
||
| 11718 |
mstore(0x40, p1) |
||
| 11719 |
mstore(0x60, p2) |
||
| 11720 |
mstore(0x80, p3) |
||
| 11721 |
writeString(0xa0, p0) |
||
| 11722 |
} |
||
| 11723 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11724 |
assembly {
|
||
| 11725 |
mstore(0x00, m0) |
||
| 11726 |
mstore(0x20, m1) |
||
| 11727 |
mstore(0x40, m2) |
||
| 11728 |
mstore(0x60, m3) |
||
| 11729 |
mstore(0x80, m4) |
||
| 11730 |
mstore(0xa0, m5) |
||
| 11731 |
mstore(0xc0, m6) |
||
| 11732 |
} |
||
| 11733 |
} |
||
| 11734 | |||
| 11735 |
function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {
|
||
| 11736 |
bytes32 m0; |
||
| 11737 |
bytes32 m1; |
||
| 11738 |
bytes32 m2; |
||
| 11739 |
bytes32 m3; |
||
| 11740 |
bytes32 m4; |
||
| 11741 |
bytes32 m5; |
||
| 11742 |
bytes32 m6; |
||
| 11743 |
assembly {
|
||
| 11744 |
function writeString(pos, w) {
|
||
| 11745 |
let length := 0 |
||
| 11746 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11747 |
mstore(pos, length) |
||
| 11748 |
let shift := sub(256, shl(3, length)) |
||
| 11749 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11750 |
} |
||
| 11751 |
m0 := mload(0x00) |
||
| 11752 |
m1 := mload(0x20) |
||
| 11753 |
m2 := mload(0x40) |
||
| 11754 |
m3 := mload(0x60) |
||
| 11755 |
m4 := mload(0x80) |
||
| 11756 |
m5 := mload(0xa0) |
||
| 11757 |
m6 := mload(0xc0) |
||
| 11758 |
// Selector of `log(string,uint256,address,uint256)`. |
||
| 11759 |
mstore(0x00, 0x4f04fdc6) |
||
| 11760 |
mstore(0x20, 0x80) |
||
| 11761 |
mstore(0x40, p1) |
||
| 11762 |
mstore(0x60, p2) |
||
| 11763 |
mstore(0x80, p3) |
||
| 11764 |
writeString(0xa0, p0) |
||
| 11765 |
} |
||
| 11766 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11767 |
assembly {
|
||
| 11768 |
mstore(0x00, m0) |
||
| 11769 |
mstore(0x20, m1) |
||
| 11770 |
mstore(0x40, m2) |
||
| 11771 |
mstore(0x60, m3) |
||
| 11772 |
mstore(0x80, m4) |
||
| 11773 |
mstore(0xa0, m5) |
||
| 11774 |
mstore(0xc0, m6) |
||
| 11775 |
} |
||
| 11776 |
} |
||
| 11777 | |||
| 11778 |
function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {
|
||
| 11779 |
bytes32 m0; |
||
| 11780 |
bytes32 m1; |
||
| 11781 |
bytes32 m2; |
||
| 11782 |
bytes32 m3; |
||
| 11783 |
bytes32 m4; |
||
| 11784 |
bytes32 m5; |
||
| 11785 |
bytes32 m6; |
||
| 11786 |
bytes32 m7; |
||
| 11787 |
bytes32 m8; |
||
| 11788 |
assembly {
|
||
| 11789 |
function writeString(pos, w) {
|
||
| 11790 |
let length := 0 |
||
| 11791 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11792 |
mstore(pos, length) |
||
| 11793 |
let shift := sub(256, shl(3, length)) |
||
| 11794 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11795 |
} |
||
| 11796 |
m0 := mload(0x00) |
||
| 11797 |
m1 := mload(0x20) |
||
| 11798 |
m2 := mload(0x40) |
||
| 11799 |
m3 := mload(0x60) |
||
| 11800 |
m4 := mload(0x80) |
||
| 11801 |
m5 := mload(0xa0) |
||
| 11802 |
m6 := mload(0xc0) |
||
| 11803 |
m7 := mload(0xe0) |
||
| 11804 |
m8 := mload(0x100) |
||
| 11805 |
// Selector of `log(string,uint256,address,string)`. |
||
| 11806 |
mstore(0x00, 0x9ffb2f93) |
||
| 11807 |
mstore(0x20, 0x80) |
||
| 11808 |
mstore(0x40, p1) |
||
| 11809 |
mstore(0x60, p2) |
||
| 11810 |
mstore(0x80, 0xc0) |
||
| 11811 |
writeString(0xa0, p0) |
||
| 11812 |
writeString(0xe0, p3) |
||
| 11813 |
} |
||
| 11814 |
_sendLogPayload(0x1c, 0x104); |
||
| 11815 |
assembly {
|
||
| 11816 |
mstore(0x00, m0) |
||
| 11817 |
mstore(0x20, m1) |
||
| 11818 |
mstore(0x40, m2) |
||
| 11819 |
mstore(0x60, m3) |
||
| 11820 |
mstore(0x80, m4) |
||
| 11821 |
mstore(0xa0, m5) |
||
| 11822 |
mstore(0xc0, m6) |
||
| 11823 |
mstore(0xe0, m7) |
||
| 11824 |
mstore(0x100, m8) |
||
| 11825 |
} |
||
| 11826 |
} |
||
| 11827 | |||
| 11828 |
function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {
|
||
| 11829 |
bytes32 m0; |
||
| 11830 |
bytes32 m1; |
||
| 11831 |
bytes32 m2; |
||
| 11832 |
bytes32 m3; |
||
| 11833 |
bytes32 m4; |
||
| 11834 |
bytes32 m5; |
||
| 11835 |
bytes32 m6; |
||
| 11836 |
assembly {
|
||
| 11837 |
function writeString(pos, w) {
|
||
| 11838 |
let length := 0 |
||
| 11839 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11840 |
mstore(pos, length) |
||
| 11841 |
let shift := sub(256, shl(3, length)) |
||
| 11842 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11843 |
} |
||
| 11844 |
m0 := mload(0x00) |
||
| 11845 |
m1 := mload(0x20) |
||
| 11846 |
m2 := mload(0x40) |
||
| 11847 |
m3 := mload(0x60) |
||
| 11848 |
m4 := mload(0x80) |
||
| 11849 |
m5 := mload(0xa0) |
||
| 11850 |
m6 := mload(0xc0) |
||
| 11851 |
// Selector of `log(string,uint256,bool,address)`. |
||
| 11852 |
mstore(0x00, 0xe0e95b98) |
||
| 11853 |
mstore(0x20, 0x80) |
||
| 11854 |
mstore(0x40, p1) |
||
| 11855 |
mstore(0x60, p2) |
||
| 11856 |
mstore(0x80, p3) |
||
| 11857 |
writeString(0xa0, p0) |
||
| 11858 |
} |
||
| 11859 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11860 |
assembly {
|
||
| 11861 |
mstore(0x00, m0) |
||
| 11862 |
mstore(0x20, m1) |
||
| 11863 |
mstore(0x40, m2) |
||
| 11864 |
mstore(0x60, m3) |
||
| 11865 |
mstore(0x80, m4) |
||
| 11866 |
mstore(0xa0, m5) |
||
| 11867 |
mstore(0xc0, m6) |
||
| 11868 |
} |
||
| 11869 |
} |
||
| 11870 | |||
| 11871 |
function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {
|
||
| 11872 |
bytes32 m0; |
||
| 11873 |
bytes32 m1; |
||
| 11874 |
bytes32 m2; |
||
| 11875 |
bytes32 m3; |
||
| 11876 |
bytes32 m4; |
||
| 11877 |
bytes32 m5; |
||
| 11878 |
bytes32 m6; |
||
| 11879 |
assembly {
|
||
| 11880 |
function writeString(pos, w) {
|
||
| 11881 |
let length := 0 |
||
| 11882 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11883 |
mstore(pos, length) |
||
| 11884 |
let shift := sub(256, shl(3, length)) |
||
| 11885 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11886 |
} |
||
| 11887 |
m0 := mload(0x00) |
||
| 11888 |
m1 := mload(0x20) |
||
| 11889 |
m2 := mload(0x40) |
||
| 11890 |
m3 := mload(0x60) |
||
| 11891 |
m4 := mload(0x80) |
||
| 11892 |
m5 := mload(0xa0) |
||
| 11893 |
m6 := mload(0xc0) |
||
| 11894 |
// Selector of `log(string,uint256,bool,bool)`. |
||
| 11895 |
mstore(0x00, 0x354c36d6) |
||
| 11896 |
mstore(0x20, 0x80) |
||
| 11897 |
mstore(0x40, p1) |
||
| 11898 |
mstore(0x60, p2) |
||
| 11899 |
mstore(0x80, p3) |
||
| 11900 |
writeString(0xa0, p0) |
||
| 11901 |
} |
||
| 11902 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11903 |
assembly {
|
||
| 11904 |
mstore(0x00, m0) |
||
| 11905 |
mstore(0x20, m1) |
||
| 11906 |
mstore(0x40, m2) |
||
| 11907 |
mstore(0x60, m3) |
||
| 11908 |
mstore(0x80, m4) |
||
| 11909 |
mstore(0xa0, m5) |
||
| 11910 |
mstore(0xc0, m6) |
||
| 11911 |
} |
||
| 11912 |
} |
||
| 11913 | |||
| 11914 |
function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {
|
||
| 11915 |
bytes32 m0; |
||
| 11916 |
bytes32 m1; |
||
| 11917 |
bytes32 m2; |
||
| 11918 |
bytes32 m3; |
||
| 11919 |
bytes32 m4; |
||
| 11920 |
bytes32 m5; |
||
| 11921 |
bytes32 m6; |
||
| 11922 |
assembly {
|
||
| 11923 |
function writeString(pos, w) {
|
||
| 11924 |
let length := 0 |
||
| 11925 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11926 |
mstore(pos, length) |
||
| 11927 |
let shift := sub(256, shl(3, length)) |
||
| 11928 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11929 |
} |
||
| 11930 |
m0 := mload(0x00) |
||
| 11931 |
m1 := mload(0x20) |
||
| 11932 |
m2 := mload(0x40) |
||
| 11933 |
m3 := mload(0x60) |
||
| 11934 |
m4 := mload(0x80) |
||
| 11935 |
m5 := mload(0xa0) |
||
| 11936 |
m6 := mload(0xc0) |
||
| 11937 |
// Selector of `log(string,uint256,bool,uint256)`. |
||
| 11938 |
mstore(0x00, 0xe41b6f6f) |
||
| 11939 |
mstore(0x20, 0x80) |
||
| 11940 |
mstore(0x40, p1) |
||
| 11941 |
mstore(0x60, p2) |
||
| 11942 |
mstore(0x80, p3) |
||
| 11943 |
writeString(0xa0, p0) |
||
| 11944 |
} |
||
| 11945 |
_sendLogPayload(0x1c, 0xc4); |
||
| 11946 |
assembly {
|
||
| 11947 |
mstore(0x00, m0) |
||
| 11948 |
mstore(0x20, m1) |
||
| 11949 |
mstore(0x40, m2) |
||
| 11950 |
mstore(0x60, m3) |
||
| 11951 |
mstore(0x80, m4) |
||
| 11952 |
mstore(0xa0, m5) |
||
| 11953 |
mstore(0xc0, m6) |
||
| 11954 |
} |
||
| 11955 |
} |
||
| 11956 | |||
| 11957 |
function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {
|
||
| 11958 |
bytes32 m0; |
||
| 11959 |
bytes32 m1; |
||
| 11960 |
bytes32 m2; |
||
| 11961 |
bytes32 m3; |
||
| 11962 |
bytes32 m4; |
||
| 11963 |
bytes32 m5; |
||
| 11964 |
bytes32 m6; |
||
| 11965 |
bytes32 m7; |
||
| 11966 |
bytes32 m8; |
||
| 11967 |
assembly {
|
||
| 11968 |
function writeString(pos, w) {
|
||
| 11969 |
let length := 0 |
||
| 11970 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 11971 |
mstore(pos, length) |
||
| 11972 |
let shift := sub(256, shl(3, length)) |
||
| 11973 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 11974 |
} |
||
| 11975 |
m0 := mload(0x00) |
||
| 11976 |
m1 := mload(0x20) |
||
| 11977 |
m2 := mload(0x40) |
||
| 11978 |
m3 := mload(0x60) |
||
| 11979 |
m4 := mload(0x80) |
||
| 11980 |
m5 := mload(0xa0) |
||
| 11981 |
m6 := mload(0xc0) |
||
| 11982 |
m7 := mload(0xe0) |
||
| 11983 |
m8 := mload(0x100) |
||
| 11984 |
// Selector of `log(string,uint256,bool,string)`. |
||
| 11985 |
mstore(0x00, 0xabf73a98) |
||
| 11986 |
mstore(0x20, 0x80) |
||
| 11987 |
mstore(0x40, p1) |
||
| 11988 |
mstore(0x60, p2) |
||
| 11989 |
mstore(0x80, 0xc0) |
||
| 11990 |
writeString(0xa0, p0) |
||
| 11991 |
writeString(0xe0, p3) |
||
| 11992 |
} |
||
| 11993 |
_sendLogPayload(0x1c, 0x104); |
||
| 11994 |
assembly {
|
||
| 11995 |
mstore(0x00, m0) |
||
| 11996 |
mstore(0x20, m1) |
||
| 11997 |
mstore(0x40, m2) |
||
| 11998 |
mstore(0x60, m3) |
||
| 11999 |
mstore(0x80, m4) |
||
| 12000 |
mstore(0xa0, m5) |
||
| 12001 |
mstore(0xc0, m6) |
||
| 12002 |
mstore(0xe0, m7) |
||
| 12003 |
mstore(0x100, m8) |
||
| 12004 |
} |
||
| 12005 |
} |
||
| 12006 | |||
| 12007 |
function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {
|
||
| 12008 |
bytes32 m0; |
||
| 12009 |
bytes32 m1; |
||
| 12010 |
bytes32 m2; |
||
| 12011 |
bytes32 m3; |
||
| 12012 |
bytes32 m4; |
||
| 12013 |
bytes32 m5; |
||
| 12014 |
bytes32 m6; |
||
| 12015 |
assembly {
|
||
| 12016 |
function writeString(pos, w) {
|
||
| 12017 |
let length := 0 |
||
| 12018 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12019 |
mstore(pos, length) |
||
| 12020 |
let shift := sub(256, shl(3, length)) |
||
| 12021 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12022 |
} |
||
| 12023 |
m0 := mload(0x00) |
||
| 12024 |
m1 := mload(0x20) |
||
| 12025 |
m2 := mload(0x40) |
||
| 12026 |
m3 := mload(0x60) |
||
| 12027 |
m4 := mload(0x80) |
||
| 12028 |
m5 := mload(0xa0) |
||
| 12029 |
m6 := mload(0xc0) |
||
| 12030 |
// Selector of `log(string,uint256,uint256,address)`. |
||
| 12031 |
mstore(0x00, 0xe21de278) |
||
| 12032 |
mstore(0x20, 0x80) |
||
| 12033 |
mstore(0x40, p1) |
||
| 12034 |
mstore(0x60, p2) |
||
| 12035 |
mstore(0x80, p3) |
||
| 12036 |
writeString(0xa0, p0) |
||
| 12037 |
} |
||
| 12038 |
_sendLogPayload(0x1c, 0xc4); |
||
| 12039 |
assembly {
|
||
| 12040 |
mstore(0x00, m0) |
||
| 12041 |
mstore(0x20, m1) |
||
| 12042 |
mstore(0x40, m2) |
||
| 12043 |
mstore(0x60, m3) |
||
| 12044 |
mstore(0x80, m4) |
||
| 12045 |
mstore(0xa0, m5) |
||
| 12046 |
mstore(0xc0, m6) |
||
| 12047 |
} |
||
| 12048 |
} |
||
| 12049 | |||
| 12050 |
function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {
|
||
| 12051 |
bytes32 m0; |
||
| 12052 |
bytes32 m1; |
||
| 12053 |
bytes32 m2; |
||
| 12054 |
bytes32 m3; |
||
| 12055 |
bytes32 m4; |
||
| 12056 |
bytes32 m5; |
||
| 12057 |
bytes32 m6; |
||
| 12058 |
assembly {
|
||
| 12059 |
function writeString(pos, w) {
|
||
| 12060 |
let length := 0 |
||
| 12061 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12062 |
mstore(pos, length) |
||
| 12063 |
let shift := sub(256, shl(3, length)) |
||
| 12064 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12065 |
} |
||
| 12066 |
m0 := mload(0x00) |
||
| 12067 |
m1 := mload(0x20) |
||
| 12068 |
m2 := mload(0x40) |
||
| 12069 |
m3 := mload(0x60) |
||
| 12070 |
m4 := mload(0x80) |
||
| 12071 |
m5 := mload(0xa0) |
||
| 12072 |
m6 := mload(0xc0) |
||
| 12073 |
// Selector of `log(string,uint256,uint256,bool)`. |
||
| 12074 |
mstore(0x00, 0x7626db92) |
||
| 12075 |
mstore(0x20, 0x80) |
||
| 12076 |
mstore(0x40, p1) |
||
| 12077 |
mstore(0x60, p2) |
||
| 12078 |
mstore(0x80, p3) |
||
| 12079 |
writeString(0xa0, p0) |
||
| 12080 |
} |
||
| 12081 |
_sendLogPayload(0x1c, 0xc4); |
||
| 12082 |
assembly {
|
||
| 12083 |
mstore(0x00, m0) |
||
| 12084 |
mstore(0x20, m1) |
||
| 12085 |
mstore(0x40, m2) |
||
| 12086 |
mstore(0x60, m3) |
||
| 12087 |
mstore(0x80, m4) |
||
| 12088 |
mstore(0xa0, m5) |
||
| 12089 |
mstore(0xc0, m6) |
||
| 12090 |
} |
||
| 12091 |
} |
||
| 12092 | |||
| 12093 |
function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 12094 |
bytes32 m0; |
||
| 12095 |
bytes32 m1; |
||
| 12096 |
bytes32 m2; |
||
| 12097 |
bytes32 m3; |
||
| 12098 |
bytes32 m4; |
||
| 12099 |
bytes32 m5; |
||
| 12100 |
bytes32 m6; |
||
| 12101 |
assembly {
|
||
| 12102 |
function writeString(pos, w) {
|
||
| 12103 |
let length := 0 |
||
| 12104 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12105 |
mstore(pos, length) |
||
| 12106 |
let shift := sub(256, shl(3, length)) |
||
| 12107 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12108 |
} |
||
| 12109 |
m0 := mload(0x00) |
||
| 12110 |
m1 := mload(0x20) |
||
| 12111 |
m2 := mload(0x40) |
||
| 12112 |
m3 := mload(0x60) |
||
| 12113 |
m4 := mload(0x80) |
||
| 12114 |
m5 := mload(0xa0) |
||
| 12115 |
m6 := mload(0xc0) |
||
| 12116 |
// Selector of `log(string,uint256,uint256,uint256)`. |
||
| 12117 |
mstore(0x00, 0xa7a87853) |
||
| 12118 |
mstore(0x20, 0x80) |
||
| 12119 |
mstore(0x40, p1) |
||
| 12120 |
mstore(0x60, p2) |
||
| 12121 |
mstore(0x80, p3) |
||
| 12122 |
writeString(0xa0, p0) |
||
| 12123 |
} |
||
| 12124 |
_sendLogPayload(0x1c, 0xc4); |
||
| 12125 |
assembly {
|
||
| 12126 |
mstore(0x00, m0) |
||
| 12127 |
mstore(0x20, m1) |
||
| 12128 |
mstore(0x40, m2) |
||
| 12129 |
mstore(0x60, m3) |
||
| 12130 |
mstore(0x80, m4) |
||
| 12131 |
mstore(0xa0, m5) |
||
| 12132 |
mstore(0xc0, m6) |
||
| 12133 |
} |
||
| 12134 |
} |
||
| 12135 | |||
| 12136 |
function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 12137 |
bytes32 m0; |
||
| 12138 |
bytes32 m1; |
||
| 12139 |
bytes32 m2; |
||
| 12140 |
bytes32 m3; |
||
| 12141 |
bytes32 m4; |
||
| 12142 |
bytes32 m5; |
||
| 12143 |
bytes32 m6; |
||
| 12144 |
bytes32 m7; |
||
| 12145 |
bytes32 m8; |
||
| 12146 |
assembly {
|
||
| 12147 |
function writeString(pos, w) {
|
||
| 12148 |
let length := 0 |
||
| 12149 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12150 |
mstore(pos, length) |
||
| 12151 |
let shift := sub(256, shl(3, length)) |
||
| 12152 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12153 |
} |
||
| 12154 |
m0 := mload(0x00) |
||
| 12155 |
m1 := mload(0x20) |
||
| 12156 |
m2 := mload(0x40) |
||
| 12157 |
m3 := mload(0x60) |
||
| 12158 |
m4 := mload(0x80) |
||
| 12159 |
m5 := mload(0xa0) |
||
| 12160 |
m6 := mload(0xc0) |
||
| 12161 |
m7 := mload(0xe0) |
||
| 12162 |
m8 := mload(0x100) |
||
| 12163 |
// Selector of `log(string,uint256,uint256,string)`. |
||
| 12164 |
mstore(0x00, 0x854b3496) |
||
| 12165 |
mstore(0x20, 0x80) |
||
| 12166 |
mstore(0x40, p1) |
||
| 12167 |
mstore(0x60, p2) |
||
| 12168 |
mstore(0x80, 0xc0) |
||
| 12169 |
writeString(0xa0, p0) |
||
| 12170 |
writeString(0xe0, p3) |
||
| 12171 |
} |
||
| 12172 |
_sendLogPayload(0x1c, 0x104); |
||
| 12173 |
assembly {
|
||
| 12174 |
mstore(0x00, m0) |
||
| 12175 |
mstore(0x20, m1) |
||
| 12176 |
mstore(0x40, m2) |
||
| 12177 |
mstore(0x60, m3) |
||
| 12178 |
mstore(0x80, m4) |
||
| 12179 |
mstore(0xa0, m5) |
||
| 12180 |
mstore(0xc0, m6) |
||
| 12181 |
mstore(0xe0, m7) |
||
| 12182 |
mstore(0x100, m8) |
||
| 12183 |
} |
||
| 12184 |
} |
||
| 12185 | |||
| 12186 |
function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {
|
||
| 12187 |
bytes32 m0; |
||
| 12188 |
bytes32 m1; |
||
| 12189 |
bytes32 m2; |
||
| 12190 |
bytes32 m3; |
||
| 12191 |
bytes32 m4; |
||
| 12192 |
bytes32 m5; |
||
| 12193 |
bytes32 m6; |
||
| 12194 |
bytes32 m7; |
||
| 12195 |
bytes32 m8; |
||
| 12196 |
assembly {
|
||
| 12197 |
function writeString(pos, w) {
|
||
| 12198 |
let length := 0 |
||
| 12199 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12200 |
mstore(pos, length) |
||
| 12201 |
let shift := sub(256, shl(3, length)) |
||
| 12202 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12203 |
} |
||
| 12204 |
m0 := mload(0x00) |
||
| 12205 |
m1 := mload(0x20) |
||
| 12206 |
m2 := mload(0x40) |
||
| 12207 |
m3 := mload(0x60) |
||
| 12208 |
m4 := mload(0x80) |
||
| 12209 |
m5 := mload(0xa0) |
||
| 12210 |
m6 := mload(0xc0) |
||
| 12211 |
m7 := mload(0xe0) |
||
| 12212 |
m8 := mload(0x100) |
||
| 12213 |
// Selector of `log(string,uint256,string,address)`. |
||
| 12214 |
mstore(0x00, 0x7c4632a4) |
||
| 12215 |
mstore(0x20, 0x80) |
||
| 12216 |
mstore(0x40, p1) |
||
| 12217 |
mstore(0x60, 0xc0) |
||
| 12218 |
mstore(0x80, p3) |
||
| 12219 |
writeString(0xa0, p0) |
||
| 12220 |
writeString(0xe0, p2) |
||
| 12221 |
} |
||
| 12222 |
_sendLogPayload(0x1c, 0x104); |
||
| 12223 |
assembly {
|
||
| 12224 |
mstore(0x00, m0) |
||
| 12225 |
mstore(0x20, m1) |
||
| 12226 |
mstore(0x40, m2) |
||
| 12227 |
mstore(0x60, m3) |
||
| 12228 |
mstore(0x80, m4) |
||
| 12229 |
mstore(0xa0, m5) |
||
| 12230 |
mstore(0xc0, m6) |
||
| 12231 |
mstore(0xe0, m7) |
||
| 12232 |
mstore(0x100, m8) |
||
| 12233 |
} |
||
| 12234 |
} |
||
| 12235 | |||
| 12236 |
function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {
|
||
| 12237 |
bytes32 m0; |
||
| 12238 |
bytes32 m1; |
||
| 12239 |
bytes32 m2; |
||
| 12240 |
bytes32 m3; |
||
| 12241 |
bytes32 m4; |
||
| 12242 |
bytes32 m5; |
||
| 12243 |
bytes32 m6; |
||
| 12244 |
bytes32 m7; |
||
| 12245 |
bytes32 m8; |
||
| 12246 |
assembly {
|
||
| 12247 |
function writeString(pos, w) {
|
||
| 12248 |
let length := 0 |
||
| 12249 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12250 |
mstore(pos, length) |
||
| 12251 |
let shift := sub(256, shl(3, length)) |
||
| 12252 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12253 |
} |
||
| 12254 |
m0 := mload(0x00) |
||
| 12255 |
m1 := mload(0x20) |
||
| 12256 |
m2 := mload(0x40) |
||
| 12257 |
m3 := mload(0x60) |
||
| 12258 |
m4 := mload(0x80) |
||
| 12259 |
m5 := mload(0xa0) |
||
| 12260 |
m6 := mload(0xc0) |
||
| 12261 |
m7 := mload(0xe0) |
||
| 12262 |
m8 := mload(0x100) |
||
| 12263 |
// Selector of `log(string,uint256,string,bool)`. |
||
| 12264 |
mstore(0x00, 0x7d24491d) |
||
| 12265 |
mstore(0x20, 0x80) |
||
| 12266 |
mstore(0x40, p1) |
||
| 12267 |
mstore(0x60, 0xc0) |
||
| 12268 |
mstore(0x80, p3) |
||
| 12269 |
writeString(0xa0, p0) |
||
| 12270 |
writeString(0xe0, p2) |
||
| 12271 |
} |
||
| 12272 |
_sendLogPayload(0x1c, 0x104); |
||
| 12273 |
assembly {
|
||
| 12274 |
mstore(0x00, m0) |
||
| 12275 |
mstore(0x20, m1) |
||
| 12276 |
mstore(0x40, m2) |
||
| 12277 |
mstore(0x60, m3) |
||
| 12278 |
mstore(0x80, m4) |
||
| 12279 |
mstore(0xa0, m5) |
||
| 12280 |
mstore(0xc0, m6) |
||
| 12281 |
mstore(0xe0, m7) |
||
| 12282 |
mstore(0x100, m8) |
||
| 12283 |
} |
||
| 12284 |
} |
||
| 12285 | |||
| 12286 |
function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 12287 |
bytes32 m0; |
||
| 12288 |
bytes32 m1; |
||
| 12289 |
bytes32 m2; |
||
| 12290 |
bytes32 m3; |
||
| 12291 |
bytes32 m4; |
||
| 12292 |
bytes32 m5; |
||
| 12293 |
bytes32 m6; |
||
| 12294 |
bytes32 m7; |
||
| 12295 |
bytes32 m8; |
||
| 12296 |
assembly {
|
||
| 12297 |
function writeString(pos, w) {
|
||
| 12298 |
let length := 0 |
||
| 12299 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12300 |
mstore(pos, length) |
||
| 12301 |
let shift := sub(256, shl(3, length)) |
||
| 12302 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12303 |
} |
||
| 12304 |
m0 := mload(0x00) |
||
| 12305 |
m1 := mload(0x20) |
||
| 12306 |
m2 := mload(0x40) |
||
| 12307 |
m3 := mload(0x60) |
||
| 12308 |
m4 := mload(0x80) |
||
| 12309 |
m5 := mload(0xa0) |
||
| 12310 |
m6 := mload(0xc0) |
||
| 12311 |
m7 := mload(0xe0) |
||
| 12312 |
m8 := mload(0x100) |
||
| 12313 |
// Selector of `log(string,uint256,string,uint256)`. |
||
| 12314 |
mstore(0x00, 0xc67ea9d1) |
||
| 12315 |
mstore(0x20, 0x80) |
||
| 12316 |
mstore(0x40, p1) |
||
| 12317 |
mstore(0x60, 0xc0) |
||
| 12318 |
mstore(0x80, p3) |
||
| 12319 |
writeString(0xa0, p0) |
||
| 12320 |
writeString(0xe0, p2) |
||
| 12321 |
} |
||
| 12322 |
_sendLogPayload(0x1c, 0x104); |
||
| 12323 |
assembly {
|
||
| 12324 |
mstore(0x00, m0) |
||
| 12325 |
mstore(0x20, m1) |
||
| 12326 |
mstore(0x40, m2) |
||
| 12327 |
mstore(0x60, m3) |
||
| 12328 |
mstore(0x80, m4) |
||
| 12329 |
mstore(0xa0, m5) |
||
| 12330 |
mstore(0xc0, m6) |
||
| 12331 |
mstore(0xe0, m7) |
||
| 12332 |
mstore(0x100, m8) |
||
| 12333 |
} |
||
| 12334 |
} |
||
| 12335 | |||
| 12336 |
function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 12337 |
bytes32 m0; |
||
| 12338 |
bytes32 m1; |
||
| 12339 |
bytes32 m2; |
||
| 12340 |
bytes32 m3; |
||
| 12341 |
bytes32 m4; |
||
| 12342 |
bytes32 m5; |
||
| 12343 |
bytes32 m6; |
||
| 12344 |
bytes32 m7; |
||
| 12345 |
bytes32 m8; |
||
| 12346 |
bytes32 m9; |
||
| 12347 |
bytes32 m10; |
||
| 12348 |
assembly {
|
||
| 12349 |
function writeString(pos, w) {
|
||
| 12350 |
let length := 0 |
||
| 12351 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12352 |
mstore(pos, length) |
||
| 12353 |
let shift := sub(256, shl(3, length)) |
||
| 12354 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12355 |
} |
||
| 12356 |
m0 := mload(0x00) |
||
| 12357 |
m1 := mload(0x20) |
||
| 12358 |
m2 := mload(0x40) |
||
| 12359 |
m3 := mload(0x60) |
||
| 12360 |
m4 := mload(0x80) |
||
| 12361 |
m5 := mload(0xa0) |
||
| 12362 |
m6 := mload(0xc0) |
||
| 12363 |
m7 := mload(0xe0) |
||
| 12364 |
m8 := mload(0x100) |
||
| 12365 |
m9 := mload(0x120) |
||
| 12366 |
m10 := mload(0x140) |
||
| 12367 |
// Selector of `log(string,uint256,string,string)`. |
||
| 12368 |
mstore(0x00, 0x5ab84e1f) |
||
| 12369 |
mstore(0x20, 0x80) |
||
| 12370 |
mstore(0x40, p1) |
||
| 12371 |
mstore(0x60, 0xc0) |
||
| 12372 |
mstore(0x80, 0x100) |
||
| 12373 |
writeString(0xa0, p0) |
||
| 12374 |
writeString(0xe0, p2) |
||
| 12375 |
writeString(0x120, p3) |
||
| 12376 |
} |
||
| 12377 |
_sendLogPayload(0x1c, 0x144); |
||
| 12378 |
assembly {
|
||
| 12379 |
mstore(0x00, m0) |
||
| 12380 |
mstore(0x20, m1) |
||
| 12381 |
mstore(0x40, m2) |
||
| 12382 |
mstore(0x60, m3) |
||
| 12383 |
mstore(0x80, m4) |
||
| 12384 |
mstore(0xa0, m5) |
||
| 12385 |
mstore(0xc0, m6) |
||
| 12386 |
mstore(0xe0, m7) |
||
| 12387 |
mstore(0x100, m8) |
||
| 12388 |
mstore(0x120, m9) |
||
| 12389 |
mstore(0x140, m10) |
||
| 12390 |
} |
||
| 12391 |
} |
||
| 12392 | |||
| 12393 |
function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {
|
||
| 12394 |
bytes32 m0; |
||
| 12395 |
bytes32 m1; |
||
| 12396 |
bytes32 m2; |
||
| 12397 |
bytes32 m3; |
||
| 12398 |
bytes32 m4; |
||
| 12399 |
bytes32 m5; |
||
| 12400 |
bytes32 m6; |
||
| 12401 |
bytes32 m7; |
||
| 12402 |
bytes32 m8; |
||
| 12403 |
assembly {
|
||
| 12404 |
function writeString(pos, w) {
|
||
| 12405 |
let length := 0 |
||
| 12406 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12407 |
mstore(pos, length) |
||
| 12408 |
let shift := sub(256, shl(3, length)) |
||
| 12409 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12410 |
} |
||
| 12411 |
m0 := mload(0x00) |
||
| 12412 |
m1 := mload(0x20) |
||
| 12413 |
m2 := mload(0x40) |
||
| 12414 |
m3 := mload(0x60) |
||
| 12415 |
m4 := mload(0x80) |
||
| 12416 |
m5 := mload(0xa0) |
||
| 12417 |
m6 := mload(0xc0) |
||
| 12418 |
m7 := mload(0xe0) |
||
| 12419 |
m8 := mload(0x100) |
||
| 12420 |
// Selector of `log(string,string,address,address)`. |
||
| 12421 |
mstore(0x00, 0x439c7bef) |
||
| 12422 |
mstore(0x20, 0x80) |
||
| 12423 |
mstore(0x40, 0xc0) |
||
| 12424 |
mstore(0x60, p2) |
||
| 12425 |
mstore(0x80, p3) |
||
| 12426 |
writeString(0xa0, p0) |
||
| 12427 |
writeString(0xe0, p1) |
||
| 12428 |
} |
||
| 12429 |
_sendLogPayload(0x1c, 0x104); |
||
| 12430 |
assembly {
|
||
| 12431 |
mstore(0x00, m0) |
||
| 12432 |
mstore(0x20, m1) |
||
| 12433 |
mstore(0x40, m2) |
||
| 12434 |
mstore(0x60, m3) |
||
| 12435 |
mstore(0x80, m4) |
||
| 12436 |
mstore(0xa0, m5) |
||
| 12437 |
mstore(0xc0, m6) |
||
| 12438 |
mstore(0xe0, m7) |
||
| 12439 |
mstore(0x100, m8) |
||
| 12440 |
} |
||
| 12441 |
} |
||
| 12442 | |||
| 12443 |
function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {
|
||
| 12444 |
bytes32 m0; |
||
| 12445 |
bytes32 m1; |
||
| 12446 |
bytes32 m2; |
||
| 12447 |
bytes32 m3; |
||
| 12448 |
bytes32 m4; |
||
| 12449 |
bytes32 m5; |
||
| 12450 |
bytes32 m6; |
||
| 12451 |
bytes32 m7; |
||
| 12452 |
bytes32 m8; |
||
| 12453 |
assembly {
|
||
| 12454 |
function writeString(pos, w) {
|
||
| 12455 |
let length := 0 |
||
| 12456 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12457 |
mstore(pos, length) |
||
| 12458 |
let shift := sub(256, shl(3, length)) |
||
| 12459 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12460 |
} |
||
| 12461 |
m0 := mload(0x00) |
||
| 12462 |
m1 := mload(0x20) |
||
| 12463 |
m2 := mload(0x40) |
||
| 12464 |
m3 := mload(0x60) |
||
| 12465 |
m4 := mload(0x80) |
||
| 12466 |
m5 := mload(0xa0) |
||
| 12467 |
m6 := mload(0xc0) |
||
| 12468 |
m7 := mload(0xe0) |
||
| 12469 |
m8 := mload(0x100) |
||
| 12470 |
// Selector of `log(string,string,address,bool)`. |
||
| 12471 |
mstore(0x00, 0x5ccd4e37) |
||
| 12472 |
mstore(0x20, 0x80) |
||
| 12473 |
mstore(0x40, 0xc0) |
||
| 12474 |
mstore(0x60, p2) |
||
| 12475 |
mstore(0x80, p3) |
||
| 12476 |
writeString(0xa0, p0) |
||
| 12477 |
writeString(0xe0, p1) |
||
| 12478 |
} |
||
| 12479 |
_sendLogPayload(0x1c, 0x104); |
||
| 12480 |
assembly {
|
||
| 12481 |
mstore(0x00, m0) |
||
| 12482 |
mstore(0x20, m1) |
||
| 12483 |
mstore(0x40, m2) |
||
| 12484 |
mstore(0x60, m3) |
||
| 12485 |
mstore(0x80, m4) |
||
| 12486 |
mstore(0xa0, m5) |
||
| 12487 |
mstore(0xc0, m6) |
||
| 12488 |
mstore(0xe0, m7) |
||
| 12489 |
mstore(0x100, m8) |
||
| 12490 |
} |
||
| 12491 |
} |
||
| 12492 | |||
| 12493 |
function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {
|
||
| 12494 |
bytes32 m0; |
||
| 12495 |
bytes32 m1; |
||
| 12496 |
bytes32 m2; |
||
| 12497 |
bytes32 m3; |
||
| 12498 |
bytes32 m4; |
||
| 12499 |
bytes32 m5; |
||
| 12500 |
bytes32 m6; |
||
| 12501 |
bytes32 m7; |
||
| 12502 |
bytes32 m8; |
||
| 12503 |
assembly {
|
||
| 12504 |
function writeString(pos, w) {
|
||
| 12505 |
let length := 0 |
||
| 12506 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12507 |
mstore(pos, length) |
||
| 12508 |
let shift := sub(256, shl(3, length)) |
||
| 12509 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12510 |
} |
||
| 12511 |
m0 := mload(0x00) |
||
| 12512 |
m1 := mload(0x20) |
||
| 12513 |
m2 := mload(0x40) |
||
| 12514 |
m3 := mload(0x60) |
||
| 12515 |
m4 := mload(0x80) |
||
| 12516 |
m5 := mload(0xa0) |
||
| 12517 |
m6 := mload(0xc0) |
||
| 12518 |
m7 := mload(0xe0) |
||
| 12519 |
m8 := mload(0x100) |
||
| 12520 |
// Selector of `log(string,string,address,uint256)`. |
||
| 12521 |
mstore(0x00, 0x7cc3c607) |
||
| 12522 |
mstore(0x20, 0x80) |
||
| 12523 |
mstore(0x40, 0xc0) |
||
| 12524 |
mstore(0x60, p2) |
||
| 12525 |
mstore(0x80, p3) |
||
| 12526 |
writeString(0xa0, p0) |
||
| 12527 |
writeString(0xe0, p1) |
||
| 12528 |
} |
||
| 12529 |
_sendLogPayload(0x1c, 0x104); |
||
| 12530 |
assembly {
|
||
| 12531 |
mstore(0x00, m0) |
||
| 12532 |
mstore(0x20, m1) |
||
| 12533 |
mstore(0x40, m2) |
||
| 12534 |
mstore(0x60, m3) |
||
| 12535 |
mstore(0x80, m4) |
||
| 12536 |
mstore(0xa0, m5) |
||
| 12537 |
mstore(0xc0, m6) |
||
| 12538 |
mstore(0xe0, m7) |
||
| 12539 |
mstore(0x100, m8) |
||
| 12540 |
} |
||
| 12541 |
} |
||
| 12542 | |||
| 12543 |
function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {
|
||
| 12544 |
bytes32 m0; |
||
| 12545 |
bytes32 m1; |
||
| 12546 |
bytes32 m2; |
||
| 12547 |
bytes32 m3; |
||
| 12548 |
bytes32 m4; |
||
| 12549 |
bytes32 m5; |
||
| 12550 |
bytes32 m6; |
||
| 12551 |
bytes32 m7; |
||
| 12552 |
bytes32 m8; |
||
| 12553 |
bytes32 m9; |
||
| 12554 |
bytes32 m10; |
||
| 12555 |
assembly {
|
||
| 12556 |
function writeString(pos, w) {
|
||
| 12557 |
let length := 0 |
||
| 12558 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12559 |
mstore(pos, length) |
||
| 12560 |
let shift := sub(256, shl(3, length)) |
||
| 12561 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12562 |
} |
||
| 12563 |
m0 := mload(0x00) |
||
| 12564 |
m1 := mload(0x20) |
||
| 12565 |
m2 := mload(0x40) |
||
| 12566 |
m3 := mload(0x60) |
||
| 12567 |
m4 := mload(0x80) |
||
| 12568 |
m5 := mload(0xa0) |
||
| 12569 |
m6 := mload(0xc0) |
||
| 12570 |
m7 := mload(0xe0) |
||
| 12571 |
m8 := mload(0x100) |
||
| 12572 |
m9 := mload(0x120) |
||
| 12573 |
m10 := mload(0x140) |
||
| 12574 |
// Selector of `log(string,string,address,string)`. |
||
| 12575 |
mstore(0x00, 0xeb1bff80) |
||
| 12576 |
mstore(0x20, 0x80) |
||
| 12577 |
mstore(0x40, 0xc0) |
||
| 12578 |
mstore(0x60, p2) |
||
| 12579 |
mstore(0x80, 0x100) |
||
| 12580 |
writeString(0xa0, p0) |
||
| 12581 |
writeString(0xe0, p1) |
||
| 12582 |
writeString(0x120, p3) |
||
| 12583 |
} |
||
| 12584 |
_sendLogPayload(0x1c, 0x144); |
||
| 12585 |
assembly {
|
||
| 12586 |
mstore(0x00, m0) |
||
| 12587 |
mstore(0x20, m1) |
||
| 12588 |
mstore(0x40, m2) |
||
| 12589 |
mstore(0x60, m3) |
||
| 12590 |
mstore(0x80, m4) |
||
| 12591 |
mstore(0xa0, m5) |
||
| 12592 |
mstore(0xc0, m6) |
||
| 12593 |
mstore(0xe0, m7) |
||
| 12594 |
mstore(0x100, m8) |
||
| 12595 |
mstore(0x120, m9) |
||
| 12596 |
mstore(0x140, m10) |
||
| 12597 |
} |
||
| 12598 |
} |
||
| 12599 | |||
| 12600 |
function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {
|
||
| 12601 |
bytes32 m0; |
||
| 12602 |
bytes32 m1; |
||
| 12603 |
bytes32 m2; |
||
| 12604 |
bytes32 m3; |
||
| 12605 |
bytes32 m4; |
||
| 12606 |
bytes32 m5; |
||
| 12607 |
bytes32 m6; |
||
| 12608 |
bytes32 m7; |
||
| 12609 |
bytes32 m8; |
||
| 12610 |
assembly {
|
||
| 12611 |
function writeString(pos, w) {
|
||
| 12612 |
let length := 0 |
||
| 12613 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12614 |
mstore(pos, length) |
||
| 12615 |
let shift := sub(256, shl(3, length)) |
||
| 12616 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12617 |
} |
||
| 12618 |
m0 := mload(0x00) |
||
| 12619 |
m1 := mload(0x20) |
||
| 12620 |
m2 := mload(0x40) |
||
| 12621 |
m3 := mload(0x60) |
||
| 12622 |
m4 := mload(0x80) |
||
| 12623 |
m5 := mload(0xa0) |
||
| 12624 |
m6 := mload(0xc0) |
||
| 12625 |
m7 := mload(0xe0) |
||
| 12626 |
m8 := mload(0x100) |
||
| 12627 |
// Selector of `log(string,string,bool,address)`. |
||
| 12628 |
mstore(0x00, 0xc371c7db) |
||
| 12629 |
mstore(0x20, 0x80) |
||
| 12630 |
mstore(0x40, 0xc0) |
||
| 12631 |
mstore(0x60, p2) |
||
| 12632 |
mstore(0x80, p3) |
||
| 12633 |
writeString(0xa0, p0) |
||
| 12634 |
writeString(0xe0, p1) |
||
| 12635 |
} |
||
| 12636 |
_sendLogPayload(0x1c, 0x104); |
||
| 12637 |
assembly {
|
||
| 12638 |
mstore(0x00, m0) |
||
| 12639 |
mstore(0x20, m1) |
||
| 12640 |
mstore(0x40, m2) |
||
| 12641 |
mstore(0x60, m3) |
||
| 12642 |
mstore(0x80, m4) |
||
| 12643 |
mstore(0xa0, m5) |
||
| 12644 |
mstore(0xc0, m6) |
||
| 12645 |
mstore(0xe0, m7) |
||
| 12646 |
mstore(0x100, m8) |
||
| 12647 |
} |
||
| 12648 |
} |
||
| 12649 | |||
| 12650 |
function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {
|
||
| 12651 |
bytes32 m0; |
||
| 12652 |
bytes32 m1; |
||
| 12653 |
bytes32 m2; |
||
| 12654 |
bytes32 m3; |
||
| 12655 |
bytes32 m4; |
||
| 12656 |
bytes32 m5; |
||
| 12657 |
bytes32 m6; |
||
| 12658 |
bytes32 m7; |
||
| 12659 |
bytes32 m8; |
||
| 12660 |
assembly {
|
||
| 12661 |
function writeString(pos, w) {
|
||
| 12662 |
let length := 0 |
||
| 12663 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12664 |
mstore(pos, length) |
||
| 12665 |
let shift := sub(256, shl(3, length)) |
||
| 12666 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12667 |
} |
||
| 12668 |
m0 := mload(0x00) |
||
| 12669 |
m1 := mload(0x20) |
||
| 12670 |
m2 := mload(0x40) |
||
| 12671 |
m3 := mload(0x60) |
||
| 12672 |
m4 := mload(0x80) |
||
| 12673 |
m5 := mload(0xa0) |
||
| 12674 |
m6 := mload(0xc0) |
||
| 12675 |
m7 := mload(0xe0) |
||
| 12676 |
m8 := mload(0x100) |
||
| 12677 |
// Selector of `log(string,string,bool,bool)`. |
||
| 12678 |
mstore(0x00, 0x40785869) |
||
| 12679 |
mstore(0x20, 0x80) |
||
| 12680 |
mstore(0x40, 0xc0) |
||
| 12681 |
mstore(0x60, p2) |
||
| 12682 |
mstore(0x80, p3) |
||
| 12683 |
writeString(0xa0, p0) |
||
| 12684 |
writeString(0xe0, p1) |
||
| 12685 |
} |
||
| 12686 |
_sendLogPayload(0x1c, 0x104); |
||
| 12687 |
assembly {
|
||
| 12688 |
mstore(0x00, m0) |
||
| 12689 |
mstore(0x20, m1) |
||
| 12690 |
mstore(0x40, m2) |
||
| 12691 |
mstore(0x60, m3) |
||
| 12692 |
mstore(0x80, m4) |
||
| 12693 |
mstore(0xa0, m5) |
||
| 12694 |
mstore(0xc0, m6) |
||
| 12695 |
mstore(0xe0, m7) |
||
| 12696 |
mstore(0x100, m8) |
||
| 12697 |
} |
||
| 12698 |
} |
||
| 12699 | |||
| 12700 |
function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {
|
||
| 12701 |
bytes32 m0; |
||
| 12702 |
bytes32 m1; |
||
| 12703 |
bytes32 m2; |
||
| 12704 |
bytes32 m3; |
||
| 12705 |
bytes32 m4; |
||
| 12706 |
bytes32 m5; |
||
| 12707 |
bytes32 m6; |
||
| 12708 |
bytes32 m7; |
||
| 12709 |
bytes32 m8; |
||
| 12710 |
assembly {
|
||
| 12711 |
function writeString(pos, w) {
|
||
| 12712 |
let length := 0 |
||
| 12713 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12714 |
mstore(pos, length) |
||
| 12715 |
let shift := sub(256, shl(3, length)) |
||
| 12716 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12717 |
} |
||
| 12718 |
m0 := mload(0x00) |
||
| 12719 |
m1 := mload(0x20) |
||
| 12720 |
m2 := mload(0x40) |
||
| 12721 |
m3 := mload(0x60) |
||
| 12722 |
m4 := mload(0x80) |
||
| 12723 |
m5 := mload(0xa0) |
||
| 12724 |
m6 := mload(0xc0) |
||
| 12725 |
m7 := mload(0xe0) |
||
| 12726 |
m8 := mload(0x100) |
||
| 12727 |
// Selector of `log(string,string,bool,uint256)`. |
||
| 12728 |
mstore(0x00, 0xd6aefad2) |
||
| 12729 |
mstore(0x20, 0x80) |
||
| 12730 |
mstore(0x40, 0xc0) |
||
| 12731 |
mstore(0x60, p2) |
||
| 12732 |
mstore(0x80, p3) |
||
| 12733 |
writeString(0xa0, p0) |
||
| 12734 |
writeString(0xe0, p1) |
||
| 12735 |
} |
||
| 12736 |
_sendLogPayload(0x1c, 0x104); |
||
| 12737 |
assembly {
|
||
| 12738 |
mstore(0x00, m0) |
||
| 12739 |
mstore(0x20, m1) |
||
| 12740 |
mstore(0x40, m2) |
||
| 12741 |
mstore(0x60, m3) |
||
| 12742 |
mstore(0x80, m4) |
||
| 12743 |
mstore(0xa0, m5) |
||
| 12744 |
mstore(0xc0, m6) |
||
| 12745 |
mstore(0xe0, m7) |
||
| 12746 |
mstore(0x100, m8) |
||
| 12747 |
} |
||
| 12748 |
} |
||
| 12749 | |||
| 12750 |
function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {
|
||
| 12751 |
bytes32 m0; |
||
| 12752 |
bytes32 m1; |
||
| 12753 |
bytes32 m2; |
||
| 12754 |
bytes32 m3; |
||
| 12755 |
bytes32 m4; |
||
| 12756 |
bytes32 m5; |
||
| 12757 |
bytes32 m6; |
||
| 12758 |
bytes32 m7; |
||
| 12759 |
bytes32 m8; |
||
| 12760 |
bytes32 m9; |
||
| 12761 |
bytes32 m10; |
||
| 12762 |
assembly {
|
||
| 12763 |
function writeString(pos, w) {
|
||
| 12764 |
let length := 0 |
||
| 12765 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12766 |
mstore(pos, length) |
||
| 12767 |
let shift := sub(256, shl(3, length)) |
||
| 12768 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12769 |
} |
||
| 12770 |
m0 := mload(0x00) |
||
| 12771 |
m1 := mload(0x20) |
||
| 12772 |
m2 := mload(0x40) |
||
| 12773 |
m3 := mload(0x60) |
||
| 12774 |
m4 := mload(0x80) |
||
| 12775 |
m5 := mload(0xa0) |
||
| 12776 |
m6 := mload(0xc0) |
||
| 12777 |
m7 := mload(0xe0) |
||
| 12778 |
m8 := mload(0x100) |
||
| 12779 |
m9 := mload(0x120) |
||
| 12780 |
m10 := mload(0x140) |
||
| 12781 |
// Selector of `log(string,string,bool,string)`. |
||
| 12782 |
mstore(0x00, 0x5e84b0ea) |
||
| 12783 |
mstore(0x20, 0x80) |
||
| 12784 |
mstore(0x40, 0xc0) |
||
| 12785 |
mstore(0x60, p2) |
||
| 12786 |
mstore(0x80, 0x100) |
||
| 12787 |
writeString(0xa0, p0) |
||
| 12788 |
writeString(0xe0, p1) |
||
| 12789 |
writeString(0x120, p3) |
||
| 12790 |
} |
||
| 12791 |
_sendLogPayload(0x1c, 0x144); |
||
| 12792 |
assembly {
|
||
| 12793 |
mstore(0x00, m0) |
||
| 12794 |
mstore(0x20, m1) |
||
| 12795 |
mstore(0x40, m2) |
||
| 12796 |
mstore(0x60, m3) |
||
| 12797 |
mstore(0x80, m4) |
||
| 12798 |
mstore(0xa0, m5) |
||
| 12799 |
mstore(0xc0, m6) |
||
| 12800 |
mstore(0xe0, m7) |
||
| 12801 |
mstore(0x100, m8) |
||
| 12802 |
mstore(0x120, m9) |
||
| 12803 |
mstore(0x140, m10) |
||
| 12804 |
} |
||
| 12805 |
} |
||
| 12806 | |||
| 12807 |
function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {
|
||
| 12808 |
bytes32 m0; |
||
| 12809 |
bytes32 m1; |
||
| 12810 |
bytes32 m2; |
||
| 12811 |
bytes32 m3; |
||
| 12812 |
bytes32 m4; |
||
| 12813 |
bytes32 m5; |
||
| 12814 |
bytes32 m6; |
||
| 12815 |
bytes32 m7; |
||
| 12816 |
bytes32 m8; |
||
| 12817 |
assembly {
|
||
| 12818 |
function writeString(pos, w) {
|
||
| 12819 |
let length := 0 |
||
| 12820 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12821 |
mstore(pos, length) |
||
| 12822 |
let shift := sub(256, shl(3, length)) |
||
| 12823 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12824 |
} |
||
| 12825 |
m0 := mload(0x00) |
||
| 12826 |
m1 := mload(0x20) |
||
| 12827 |
m2 := mload(0x40) |
||
| 12828 |
m3 := mload(0x60) |
||
| 12829 |
m4 := mload(0x80) |
||
| 12830 |
m5 := mload(0xa0) |
||
| 12831 |
m6 := mload(0xc0) |
||
| 12832 |
m7 := mload(0xe0) |
||
| 12833 |
m8 := mload(0x100) |
||
| 12834 |
// Selector of `log(string,string,uint256,address)`. |
||
| 12835 |
mstore(0x00, 0x1023f7b2) |
||
| 12836 |
mstore(0x20, 0x80) |
||
| 12837 |
mstore(0x40, 0xc0) |
||
| 12838 |
mstore(0x60, p2) |
||
| 12839 |
mstore(0x80, p3) |
||
| 12840 |
writeString(0xa0, p0) |
||
| 12841 |
writeString(0xe0, p1) |
||
| 12842 |
} |
||
| 12843 |
_sendLogPayload(0x1c, 0x104); |
||
| 12844 |
assembly {
|
||
| 12845 |
mstore(0x00, m0) |
||
| 12846 |
mstore(0x20, m1) |
||
| 12847 |
mstore(0x40, m2) |
||
| 12848 |
mstore(0x60, m3) |
||
| 12849 |
mstore(0x80, m4) |
||
| 12850 |
mstore(0xa0, m5) |
||
| 12851 |
mstore(0xc0, m6) |
||
| 12852 |
mstore(0xe0, m7) |
||
| 12853 |
mstore(0x100, m8) |
||
| 12854 |
} |
||
| 12855 |
} |
||
| 12856 | |||
| 12857 |
function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {
|
||
| 12858 |
bytes32 m0; |
||
| 12859 |
bytes32 m1; |
||
| 12860 |
bytes32 m2; |
||
| 12861 |
bytes32 m3; |
||
| 12862 |
bytes32 m4; |
||
| 12863 |
bytes32 m5; |
||
| 12864 |
bytes32 m6; |
||
| 12865 |
bytes32 m7; |
||
| 12866 |
bytes32 m8; |
||
| 12867 |
assembly {
|
||
| 12868 |
function writeString(pos, w) {
|
||
| 12869 |
let length := 0 |
||
| 12870 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12871 |
mstore(pos, length) |
||
| 12872 |
let shift := sub(256, shl(3, length)) |
||
| 12873 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12874 |
} |
||
| 12875 |
m0 := mload(0x00) |
||
| 12876 |
m1 := mload(0x20) |
||
| 12877 |
m2 := mload(0x40) |
||
| 12878 |
m3 := mload(0x60) |
||
| 12879 |
m4 := mload(0x80) |
||
| 12880 |
m5 := mload(0xa0) |
||
| 12881 |
m6 := mload(0xc0) |
||
| 12882 |
m7 := mload(0xe0) |
||
| 12883 |
m8 := mload(0x100) |
||
| 12884 |
// Selector of `log(string,string,uint256,bool)`. |
||
| 12885 |
mstore(0x00, 0xc3a8a654) |
||
| 12886 |
mstore(0x20, 0x80) |
||
| 12887 |
mstore(0x40, 0xc0) |
||
| 12888 |
mstore(0x60, p2) |
||
| 12889 |
mstore(0x80, p3) |
||
| 12890 |
writeString(0xa0, p0) |
||
| 12891 |
writeString(0xe0, p1) |
||
| 12892 |
} |
||
| 12893 |
_sendLogPayload(0x1c, 0x104); |
||
| 12894 |
assembly {
|
||
| 12895 |
mstore(0x00, m0) |
||
| 12896 |
mstore(0x20, m1) |
||
| 12897 |
mstore(0x40, m2) |
||
| 12898 |
mstore(0x60, m3) |
||
| 12899 |
mstore(0x80, m4) |
||
| 12900 |
mstore(0xa0, m5) |
||
| 12901 |
mstore(0xc0, m6) |
||
| 12902 |
mstore(0xe0, m7) |
||
| 12903 |
mstore(0x100, m8) |
||
| 12904 |
} |
||
| 12905 |
} |
||
| 12906 | |||
| 12907 |
function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {
|
||
| 12908 |
bytes32 m0; |
||
| 12909 |
bytes32 m1; |
||
| 12910 |
bytes32 m2; |
||
| 12911 |
bytes32 m3; |
||
| 12912 |
bytes32 m4; |
||
| 12913 |
bytes32 m5; |
||
| 12914 |
bytes32 m6; |
||
| 12915 |
bytes32 m7; |
||
| 12916 |
bytes32 m8; |
||
| 12917 |
assembly {
|
||
| 12918 |
function writeString(pos, w) {
|
||
| 12919 |
let length := 0 |
||
| 12920 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12921 |
mstore(pos, length) |
||
| 12922 |
let shift := sub(256, shl(3, length)) |
||
| 12923 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12924 |
} |
||
| 12925 |
m0 := mload(0x00) |
||
| 12926 |
m1 := mload(0x20) |
||
| 12927 |
m2 := mload(0x40) |
||
| 12928 |
m3 := mload(0x60) |
||
| 12929 |
m4 := mload(0x80) |
||
| 12930 |
m5 := mload(0xa0) |
||
| 12931 |
m6 := mload(0xc0) |
||
| 12932 |
m7 := mload(0xe0) |
||
| 12933 |
m8 := mload(0x100) |
||
| 12934 |
// Selector of `log(string,string,uint256,uint256)`. |
||
| 12935 |
mstore(0x00, 0xf45d7d2c) |
||
| 12936 |
mstore(0x20, 0x80) |
||
| 12937 |
mstore(0x40, 0xc0) |
||
| 12938 |
mstore(0x60, p2) |
||
| 12939 |
mstore(0x80, p3) |
||
| 12940 |
writeString(0xa0, p0) |
||
| 12941 |
writeString(0xe0, p1) |
||
| 12942 |
} |
||
| 12943 |
_sendLogPayload(0x1c, 0x104); |
||
| 12944 |
assembly {
|
||
| 12945 |
mstore(0x00, m0) |
||
| 12946 |
mstore(0x20, m1) |
||
| 12947 |
mstore(0x40, m2) |
||
| 12948 |
mstore(0x60, m3) |
||
| 12949 |
mstore(0x80, m4) |
||
| 12950 |
mstore(0xa0, m5) |
||
| 12951 |
mstore(0xc0, m6) |
||
| 12952 |
mstore(0xe0, m7) |
||
| 12953 |
mstore(0x100, m8) |
||
| 12954 |
} |
||
| 12955 |
} |
||
| 12956 | |||
| 12957 |
function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {
|
||
| 12958 |
bytes32 m0; |
||
| 12959 |
bytes32 m1; |
||
| 12960 |
bytes32 m2; |
||
| 12961 |
bytes32 m3; |
||
| 12962 |
bytes32 m4; |
||
| 12963 |
bytes32 m5; |
||
| 12964 |
bytes32 m6; |
||
| 12965 |
bytes32 m7; |
||
| 12966 |
bytes32 m8; |
||
| 12967 |
bytes32 m9; |
||
| 12968 |
bytes32 m10; |
||
| 12969 |
assembly {
|
||
| 12970 |
function writeString(pos, w) {
|
||
| 12971 |
let length := 0 |
||
| 12972 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 12973 |
mstore(pos, length) |
||
| 12974 |
let shift := sub(256, shl(3, length)) |
||
| 12975 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 12976 |
} |
||
| 12977 |
m0 := mload(0x00) |
||
| 12978 |
m1 := mload(0x20) |
||
| 12979 |
m2 := mload(0x40) |
||
| 12980 |
m3 := mload(0x60) |
||
| 12981 |
m4 := mload(0x80) |
||
| 12982 |
m5 := mload(0xa0) |
||
| 12983 |
m6 := mload(0xc0) |
||
| 12984 |
m7 := mload(0xe0) |
||
| 12985 |
m8 := mload(0x100) |
||
| 12986 |
m9 := mload(0x120) |
||
| 12987 |
m10 := mload(0x140) |
||
| 12988 |
// Selector of `log(string,string,uint256,string)`. |
||
| 12989 |
mstore(0x00, 0x5d1a971a) |
||
| 12990 |
mstore(0x20, 0x80) |
||
| 12991 |
mstore(0x40, 0xc0) |
||
| 12992 |
mstore(0x60, p2) |
||
| 12993 |
mstore(0x80, 0x100) |
||
| 12994 |
writeString(0xa0, p0) |
||
| 12995 |
writeString(0xe0, p1) |
||
| 12996 |
writeString(0x120, p3) |
||
| 12997 |
} |
||
| 12998 |
_sendLogPayload(0x1c, 0x144); |
||
| 12999 |
assembly {
|
||
| 13000 |
mstore(0x00, m0) |
||
| 13001 |
mstore(0x20, m1) |
||
| 13002 |
mstore(0x40, m2) |
||
| 13003 |
mstore(0x60, m3) |
||
| 13004 |
mstore(0x80, m4) |
||
| 13005 |
mstore(0xa0, m5) |
||
| 13006 |
mstore(0xc0, m6) |
||
| 13007 |
mstore(0xe0, m7) |
||
| 13008 |
mstore(0x100, m8) |
||
| 13009 |
mstore(0x120, m9) |
||
| 13010 |
mstore(0x140, m10) |
||
| 13011 |
} |
||
| 13012 |
} |
||
| 13013 | |||
| 13014 |
function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {
|
||
| 13015 |
bytes32 m0; |
||
| 13016 |
bytes32 m1; |
||
| 13017 |
bytes32 m2; |
||
| 13018 |
bytes32 m3; |
||
| 13019 |
bytes32 m4; |
||
| 13020 |
bytes32 m5; |
||
| 13021 |
bytes32 m6; |
||
| 13022 |
bytes32 m7; |
||
| 13023 |
bytes32 m8; |
||
| 13024 |
bytes32 m9; |
||
| 13025 |
bytes32 m10; |
||
| 13026 |
assembly {
|
||
| 13027 |
function writeString(pos, w) {
|
||
| 13028 |
let length := 0 |
||
| 13029 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 13030 |
mstore(pos, length) |
||
| 13031 |
let shift := sub(256, shl(3, length)) |
||
| 13032 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 13033 |
} |
||
| 13034 |
m0 := mload(0x00) |
||
| 13035 |
m1 := mload(0x20) |
||
| 13036 |
m2 := mload(0x40) |
||
| 13037 |
m3 := mload(0x60) |
||
| 13038 |
m4 := mload(0x80) |
||
| 13039 |
m5 := mload(0xa0) |
||
| 13040 |
m6 := mload(0xc0) |
||
| 13041 |
m7 := mload(0xe0) |
||
| 13042 |
m8 := mload(0x100) |
||
| 13043 |
m9 := mload(0x120) |
||
| 13044 |
m10 := mload(0x140) |
||
| 13045 |
// Selector of `log(string,string,string,address)`. |
||
| 13046 |
mstore(0x00, 0x6d572f44) |
||
| 13047 |
mstore(0x20, 0x80) |
||
| 13048 |
mstore(0x40, 0xc0) |
||
| 13049 |
mstore(0x60, 0x100) |
||
| 13050 |
mstore(0x80, p3) |
||
| 13051 |
writeString(0xa0, p0) |
||
| 13052 |
writeString(0xe0, p1) |
||
| 13053 |
writeString(0x120, p2) |
||
| 13054 |
} |
||
| 13055 |
_sendLogPayload(0x1c, 0x144); |
||
| 13056 |
assembly {
|
||
| 13057 |
mstore(0x00, m0) |
||
| 13058 |
mstore(0x20, m1) |
||
| 13059 |
mstore(0x40, m2) |
||
| 13060 |
mstore(0x60, m3) |
||
| 13061 |
mstore(0x80, m4) |
||
| 13062 |
mstore(0xa0, m5) |
||
| 13063 |
mstore(0xc0, m6) |
||
| 13064 |
mstore(0xe0, m7) |
||
| 13065 |
mstore(0x100, m8) |
||
| 13066 |
mstore(0x120, m9) |
||
| 13067 |
mstore(0x140, m10) |
||
| 13068 |
} |
||
| 13069 |
} |
||
| 13070 | |||
| 13071 |
function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {
|
||
| 13072 |
bytes32 m0; |
||
| 13073 |
bytes32 m1; |
||
| 13074 |
bytes32 m2; |
||
| 13075 |
bytes32 m3; |
||
| 13076 |
bytes32 m4; |
||
| 13077 |
bytes32 m5; |
||
| 13078 |
bytes32 m6; |
||
| 13079 |
bytes32 m7; |
||
| 13080 |
bytes32 m8; |
||
| 13081 |
bytes32 m9; |
||
| 13082 |
bytes32 m10; |
||
| 13083 |
assembly {
|
||
| 13084 |
function writeString(pos, w) {
|
||
| 13085 |
let length := 0 |
||
| 13086 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 13087 |
mstore(pos, length) |
||
| 13088 |
let shift := sub(256, shl(3, length)) |
||
| 13089 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 13090 |
} |
||
| 13091 |
m0 := mload(0x00) |
||
| 13092 |
m1 := mload(0x20) |
||
| 13093 |
m2 := mload(0x40) |
||
| 13094 |
m3 := mload(0x60) |
||
| 13095 |
m4 := mload(0x80) |
||
| 13096 |
m5 := mload(0xa0) |
||
| 13097 |
m6 := mload(0xc0) |
||
| 13098 |
m7 := mload(0xe0) |
||
| 13099 |
m8 := mload(0x100) |
||
| 13100 |
m9 := mload(0x120) |
||
| 13101 |
m10 := mload(0x140) |
||
| 13102 |
// Selector of `log(string,string,string,bool)`. |
||
| 13103 |
mstore(0x00, 0x2c1754ed) |
||
| 13104 |
mstore(0x20, 0x80) |
||
| 13105 |
mstore(0x40, 0xc0) |
||
| 13106 |
mstore(0x60, 0x100) |
||
| 13107 |
mstore(0x80, p3) |
||
| 13108 |
writeString(0xa0, p0) |
||
| 13109 |
writeString(0xe0, p1) |
||
| 13110 |
writeString(0x120, p2) |
||
| 13111 |
} |
||
| 13112 |
_sendLogPayload(0x1c, 0x144); |
||
| 13113 |
assembly {
|
||
| 13114 |
mstore(0x00, m0) |
||
| 13115 |
mstore(0x20, m1) |
||
| 13116 |
mstore(0x40, m2) |
||
| 13117 |
mstore(0x60, m3) |
||
| 13118 |
mstore(0x80, m4) |
||
| 13119 |
mstore(0xa0, m5) |
||
| 13120 |
mstore(0xc0, m6) |
||
| 13121 |
mstore(0xe0, m7) |
||
| 13122 |
mstore(0x100, m8) |
||
| 13123 |
mstore(0x120, m9) |
||
| 13124 |
mstore(0x140, m10) |
||
| 13125 |
} |
||
| 13126 |
} |
||
| 13127 | |||
| 13128 |
function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {
|
||
| 13129 |
bytes32 m0; |
||
| 13130 |
bytes32 m1; |
||
| 13131 |
bytes32 m2; |
||
| 13132 |
bytes32 m3; |
||
| 13133 |
bytes32 m4; |
||
| 13134 |
bytes32 m5; |
||
| 13135 |
bytes32 m6; |
||
| 13136 |
bytes32 m7; |
||
| 13137 |
bytes32 m8; |
||
| 13138 |
bytes32 m9; |
||
| 13139 |
bytes32 m10; |
||
| 13140 |
assembly {
|
||
| 13141 |
function writeString(pos, w) {
|
||
| 13142 |
let length := 0 |
||
| 13143 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 13144 |
mstore(pos, length) |
||
| 13145 |
let shift := sub(256, shl(3, length)) |
||
| 13146 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 13147 |
} |
||
| 13148 |
m0 := mload(0x00) |
||
| 13149 |
m1 := mload(0x20) |
||
| 13150 |
m2 := mload(0x40) |
||
| 13151 |
m3 := mload(0x60) |
||
| 13152 |
m4 := mload(0x80) |
||
| 13153 |
m5 := mload(0xa0) |
||
| 13154 |
m6 := mload(0xc0) |
||
| 13155 |
m7 := mload(0xe0) |
||
| 13156 |
m8 := mload(0x100) |
||
| 13157 |
m9 := mload(0x120) |
||
| 13158 |
m10 := mload(0x140) |
||
| 13159 |
// Selector of `log(string,string,string,uint256)`. |
||
| 13160 |
mstore(0x00, 0x8eafb02b) |
||
| 13161 |
mstore(0x20, 0x80) |
||
| 13162 |
mstore(0x40, 0xc0) |
||
| 13163 |
mstore(0x60, 0x100) |
||
| 13164 |
mstore(0x80, p3) |
||
| 13165 |
writeString(0xa0, p0) |
||
| 13166 |
writeString(0xe0, p1) |
||
| 13167 |
writeString(0x120, p2) |
||
| 13168 |
} |
||
| 13169 |
_sendLogPayload(0x1c, 0x144); |
||
| 13170 |
assembly {
|
||
| 13171 |
mstore(0x00, m0) |
||
| 13172 |
mstore(0x20, m1) |
||
| 13173 |
mstore(0x40, m2) |
||
| 13174 |
mstore(0x60, m3) |
||
| 13175 |
mstore(0x80, m4) |
||
| 13176 |
mstore(0xa0, m5) |
||
| 13177 |
mstore(0xc0, m6) |
||
| 13178 |
mstore(0xe0, m7) |
||
| 13179 |
mstore(0x100, m8) |
||
| 13180 |
mstore(0x120, m9) |
||
| 13181 |
mstore(0x140, m10) |
||
| 13182 |
} |
||
| 13183 |
} |
||
| 13184 | |||
| 13185 |
function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {
|
||
| 13186 |
bytes32 m0; |
||
| 13187 |
bytes32 m1; |
||
| 13188 |
bytes32 m2; |
||
| 13189 |
bytes32 m3; |
||
| 13190 |
bytes32 m4; |
||
| 13191 |
bytes32 m5; |
||
| 13192 |
bytes32 m6; |
||
| 13193 |
bytes32 m7; |
||
| 13194 |
bytes32 m8; |
||
| 13195 |
bytes32 m9; |
||
| 13196 |
bytes32 m10; |
||
| 13197 |
bytes32 m11; |
||
| 13198 |
bytes32 m12; |
||
| 13199 |
assembly {
|
||
| 13200 |
function writeString(pos, w) {
|
||
| 13201 |
let length := 0 |
||
| 13202 |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
|
||
| 13203 |
mstore(pos, length) |
||
| 13204 |
let shift := sub(256, shl(3, length)) |
||
| 13205 |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
||
| 13206 |
} |
||
| 13207 |
m0 := mload(0x00) |
||
| 13208 |
m1 := mload(0x20) |
||
| 13209 |
m2 := mload(0x40) |
||
| 13210 |
m3 := mload(0x60) |
||
| 13211 |
m4 := mload(0x80) |
||
| 13212 |
m5 := mload(0xa0) |
||
| 13213 |
m6 := mload(0xc0) |
||
| 13214 |
m7 := mload(0xe0) |
||
| 13215 |
m8 := mload(0x100) |
||
| 13216 |
m9 := mload(0x120) |
||
| 13217 |
m10 := mload(0x140) |
||
| 13218 |
m11 := mload(0x160) |
||
| 13219 |
m12 := mload(0x180) |
||
| 13220 |
// Selector of `log(string,string,string,string)`. |
||
| 13221 |
mstore(0x00, 0xde68f20a) |
||
| 13222 |
mstore(0x20, 0x80) |
||
| 13223 |
mstore(0x40, 0xc0) |
||
| 13224 |
mstore(0x60, 0x100) |
||
| 13225 |
mstore(0x80, 0x140) |
||
| 13226 |
writeString(0xa0, p0) |
||
| 13227 |
writeString(0xe0, p1) |
||
| 13228 |
writeString(0x120, p2) |
||
| 13229 |
writeString(0x160, p3) |
||
| 13230 |
} |
||
| 13231 |
_sendLogPayload(0x1c, 0x184); |
||
| 13232 |
assembly {
|
||
| 13233 |
mstore(0x00, m0) |
||
| 13234 |
mstore(0x20, m1) |
||
| 13235 |
mstore(0x40, m2) |
||
| 13236 |
mstore(0x60, m3) |
||
| 13237 |
mstore(0x80, m4) |
||
| 13238 |
mstore(0xa0, m5) |
||
| 13239 |
mstore(0xc0, m6) |
||
| 13240 |
mstore(0xe0, m7) |
||
| 13241 |
mstore(0x100, m8) |
||
| 13242 |
mstore(0x120, m9) |
||
| 13243 |
mstore(0x140, m10) |
||
| 13244 |
mstore(0x160, m11) |
||
| 13245 |
mstore(0x180, m12) |
||
| 13246 |
} |
||
| 13247 |
} |
||
| 13248 |
} |
||
| 13249 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
interface IERC5267 {
|
||
| 7 |
/** |
||
| 8 |
* @dev MAY be emitted to signal that the domain could have changed. |
||
| 9 |
*/ |
||
| 10 |
event EIP712DomainChanged(); |
||
| 11 | |||
| 12 |
/** |
||
| 13 |
* @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 |
||
| 14 |
* signature. |
||
| 15 |
*/ |
||
| 16 |
function eip712Domain() |
||
| 17 |
external |
||
| 18 |
view |
||
| 19 |
returns ( |
||
| 20 |
bytes1 fields, |
||
| 21 |
string memory name, |
||
| 22 |
string memory version, |
||
| 23 |
uint256 chainId, |
||
| 24 |
address verifyingContract, |
||
| 25 |
bytes32 salt, |
||
| 26 |
uint256[] memory extensions |
||
| 27 |
); |
||
| 28 |
} |
||
| 29 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) |
||
| 3 |
pragma solidity ^0.8.20; |
||
| 4 | |||
| 5 |
/** |
||
| 6 |
* @dev Standard ERC20 Errors |
||
| 7 |
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. |
||
| 8 |
*/ |
||
| 9 |
interface IERC20Errors {
|
||
| 10 |
/** |
||
| 11 |
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. |
||
| 12 |
* @param sender Address whose tokens are being transferred. |
||
| 13 |
* @param balance Current balance for the interacting account. |
||
| 14 |
* @param needed Minimum amount required to perform a transfer. |
||
| 15 |
*/ |
||
| 16 |
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); |
||
| 17 | |||
| 18 |
/** |
||
| 19 |
* @dev Indicates a failure with the token `sender`. Used in transfers. |
||
| 20 |
* @param sender Address whose tokens are being transferred. |
||
| 21 |
*/ |
||
| 22 |
error ERC20InvalidSender(address sender); |
||
| 23 | |||
| 24 |
/** |
||
| 25 |
* @dev Indicates a failure with the token `receiver`. Used in transfers. |
||
| 26 |
* @param receiver Address to which tokens are being transferred. |
||
| 27 |
*/ |
||
| 28 |
error ERC20InvalidReceiver(address receiver); |
||
| 29 | |||
| 30 |
/** |
||
| 31 |
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. |
||
| 32 |
* @param spender Address that may be allowed to operate on tokens without being their owner. |
||
| 33 |
* @param allowance Amount of tokens a `spender` is allowed to operate with. |
||
| 34 |
* @param needed Minimum amount required to perform a transfer. |
||
| 35 |
*/ |
||
| 36 |
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); |
||
| 37 | |||
| 38 |
/** |
||
| 39 |
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. |
||
| 40 |
* @param approver Address initiating an approval operation. |
||
| 41 |
*/ |
||
| 42 |
error ERC20InvalidApprover(address approver); |
||
| 43 | |||
| 44 |
/** |
||
| 45 |
* @dev Indicates a failure with the `spender` to be approved. Used in approvals. |
||
| 46 |
* @param spender Address that may be allowed to operate on tokens without being their owner. |
||
| 47 |
*/ |
||
| 48 |
error ERC20InvalidSpender(address spender); |
||
| 49 |
} |
||
| 50 | |||
| 51 |
/** |
||
| 52 |
* @dev Standard ERC721 Errors |
||
| 53 |
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. |
||
| 54 |
*/ |
||
| 55 |
interface IERC721Errors {
|
||
| 56 |
/** |
||
| 57 |
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. |
||
| 58 |
* Used in balance queries. |
||
| 59 |
* @param owner Address of the current owner of a token. |
||
| 60 |
*/ |
||
| 61 |
error ERC721InvalidOwner(address owner); |
||
| 62 | |||
| 63 |
/** |
||
| 64 |
* @dev Indicates a `tokenId` whose `owner` is the zero address. |
||
| 65 |
* @param tokenId Identifier number of a token. |
||
| 66 |
*/ |
||
| 67 |
error ERC721NonexistentToken(uint256 tokenId); |
||
| 68 | |||
| 69 |
/** |
||
| 70 |
* @dev Indicates an error related to the ownership over a particular token. Used in transfers. |
||
| 71 |
* @param sender Address whose tokens are being transferred. |
||
| 72 |
* @param tokenId Identifier number of a token. |
||
| 73 |
* @param owner Address of the current owner of a token. |
||
| 74 |
*/ |
||
| 75 |
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); |
||
| 76 | |||
| 77 |
/** |
||
| 78 |
* @dev Indicates a failure with the token `sender`. Used in transfers. |
||
| 79 |
* @param sender Address whose tokens are being transferred. |
||
| 80 |
*/ |
||
| 81 |
error ERC721InvalidSender(address sender); |
||
| 82 | |||
| 83 |
/** |
||
| 84 |
* @dev Indicates a failure with the token `receiver`. Used in transfers. |
||
| 85 |
* @param receiver Address to which tokens are being transferred. |
||
| 86 |
*/ |
||
| 87 |
error ERC721InvalidReceiver(address receiver); |
||
| 88 | |||
| 89 |
/** |
||
| 90 |
* @dev Indicates a failure with the `operator`’s approval. Used in transfers. |
||
| 91 |
* @param operator Address that may be allowed to operate on tokens without being their owner. |
||
| 92 |
* @param tokenId Identifier number of a token. |
||
| 93 |
*/ |
||
| 94 |
error ERC721InsufficientApproval(address operator, uint256 tokenId); |
||
| 95 | |||
| 96 |
/** |
||
| 97 |
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. |
||
| 98 |
* @param approver Address initiating an approval operation. |
||
| 99 |
*/ |
||
| 100 |
error ERC721InvalidApprover(address approver); |
||
| 101 | |||
| 102 |
/** |
||
| 103 |
* @dev Indicates a failure with the `operator` to be approved. Used in approvals. |
||
| 104 |
* @param operator Address that may be allowed to operate on tokens without being their owner. |
||
| 105 |
*/ |
||
| 106 |
error ERC721InvalidOperator(address operator); |
||
| 107 |
} |
||
| 108 | |||
| 109 |
/** |
||
| 110 |
* @dev Standard ERC1155 Errors |
||
| 111 |
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. |
||
| 112 |
*/ |
||
| 113 |
interface IERC1155Errors {
|
||
| 114 |
/** |
||
| 115 |
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. |
||
| 116 |
* @param sender Address whose tokens are being transferred. |
||
| 117 |
* @param balance Current balance for the interacting account. |
||
| 118 |
* @param needed Minimum amount required to perform a transfer. |
||
| 119 |
* @param tokenId Identifier number of a token. |
||
| 120 |
*/ |
||
| 121 |
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); |
||
| 122 | |||
| 123 |
/** |
||
| 124 |
* @dev Indicates a failure with the token `sender`. Used in transfers. |
||
| 125 |
* @param sender Address whose tokens are being transferred. |
||
| 126 |
*/ |
||
| 127 |
error ERC1155InvalidSender(address sender); |
||
| 128 | |||
| 129 |
/** |
||
| 130 |
* @dev Indicates a failure with the token `receiver`. Used in transfers. |
||
| 131 |
* @param receiver Address to which tokens are being transferred. |
||
| 132 |
*/ |
||
| 133 |
error ERC1155InvalidReceiver(address receiver); |
||
| 134 | |||
| 135 |
/** |
||
| 136 |
* @dev Indicates a failure with the `operator`’s approval. Used in transfers. |
||
| 137 |
* @param operator Address that may be allowed to operate on tokens without being their owner. |
||
| 138 |
* @param owner Address of the current owner of a token. |
||
| 139 |
*/ |
||
| 140 |
error ERC1155MissingApprovalForAll(address operator, address owner); |
||
| 141 | |||
| 142 |
/** |
||
| 143 |
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. |
||
| 144 |
* @param approver Address initiating an approval operation. |
||
| 145 |
*/ |
||
| 146 |
error ERC1155InvalidApprover(address approver); |
||
| 147 | |||
| 148 |
/** |
||
| 149 |
* @dev Indicates a failure with the `operator` to be approved. Used in approvals. |
||
| 150 |
* @param operator Address that may be allowed to operate on tokens without being their owner. |
||
| 151 |
*/ |
||
| 152 |
error ERC1155InvalidOperator(address operator); |
||
| 153 | |||
| 154 |
/** |
||
| 155 |
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. |
||
| 156 |
* Used in batch transfers. |
||
| 157 |
* @param idsLength Length of the array of token identifiers |
||
| 158 |
* @param valuesLength Length of the array of token amounts |
||
| 159 |
*/ |
||
| 160 |
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); |
||
| 161 |
} |
||
| 162 |
| Lines covered: | 48 / 54 (88.9%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
import {IERC20} from "./IERC20.sol";
|
||
| 7 |
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
|
||
| 8 |
import {Context} from "../../utils/Context.sol";
|
||
| 9 |
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";
|
||
| 10 | |||
| 11 |
/** |
||
| 12 |
* @dev Implementation of the {IERC20} interface.
|
||
| 13 |
* |
||
| 14 |
* This implementation is agnostic to the way tokens are created. This means |
||
| 15 |
* that a supply mechanism has to be added in a derived contract using {_mint}.
|
||
| 16 |
* |
||
| 17 |
* TIP: For a detailed writeup see our guide |
||
| 18 |
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How |
||
| 19 |
* to implement supply mechanisms]. |
||
| 20 |
* |
||
| 21 |
* The default value of {decimals} is 18. To change this, you should override
|
||
| 22 |
* this function so it returns a different value. |
||
| 23 |
* |
||
| 24 |
* We have followed general OpenZeppelin Contracts guidelines: functions revert |
||
| 25 |
* instead returning `false` on failure. This behavior is nonetheless |
||
| 26 |
* conventional and does not conflict with the expectations of ERC20 |
||
| 27 |
* applications. |
||
| 28 |
* |
||
| 29 |
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
|
||
| 30 |
* This allows applications to reconstruct the allowance for all accounts just |
||
| 31 |
* by listening to said events. Other implementations of the EIP may not emit |
||
| 32 |
* these events, as it isn't required by the specification. |
||
| 33 |
*/ |
||
| 34 |
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
|
||
| 35 |
mapping(address account => uint256) private _balances; |
||
| 36 | |||
| 37 |
mapping(address account => mapping(address spender => uint256)) private _allowances; |
||
| 38 | |||
| 39 |
uint256 private _totalSupply; |
||
| 40 | |||
| 41 |
string private _name; |
||
| 42 |
string private _symbol; |
||
| 43 | |||
| 44 |
/** |
||
| 45 |
* @dev Sets the values for {name} and {symbol}.
|
||
| 46 |
* |
||
| 47 |
* All two of these values are immutable: they can only be set once during |
||
| 48 |
* construction. |
||
| 49 |
*/ |
||
| 50 |
constructor(string memory name_, string memory symbol_) {
|
||
| 51 |
√
|
_name = name_; |
|
| 52 |
√
|
_symbol = symbol_; |
|
| 53 |
} |
||
| 54 | |||
| 55 |
/** |
||
| 56 |
* @dev Returns the name of the token. |
||
| 57 |
*/ |
||
| 58 |
function name() public view virtual returns (string memory) {
|
||
| 59 |
return _name; |
||
| 60 |
} |
||
| 61 | |||
| 62 |
/** |
||
| 63 |
* @dev Returns the symbol of the token, usually a shorter version of the |
||
| 64 |
* name. |
||
| 65 |
*/ |
||
| 66 |
√
|
function symbol() public view virtual returns (string memory) {
|
|
| 67 |
√
|
return _symbol; |
|
| 68 |
} |
||
| 69 | |||
| 70 |
/** |
||
| 71 |
* @dev Returns the number of decimals used to get its user representation. |
||
| 72 |
* For example, if `decimals` equals `2`, a balance of `505` tokens should |
||
| 73 |
* be displayed to a user as `5.05` (`505 / 10 ** 2`). |
||
| 74 |
* |
||
| 75 |
* Tokens usually opt for a value of 18, imitating the relationship between |
||
| 76 |
* Ether and Wei. This is the default value returned by this function, unless |
||
| 77 |
* it's overridden. |
||
| 78 |
* |
||
| 79 |
* NOTE: This information is only used for _display_ purposes: it in |
||
| 80 |
* no way affects any of the arithmetic of the contract, including |
||
| 81 |
* {IERC20-balanceOf} and {IERC20-transfer}.
|
||
| 82 |
*/ |
||
| 83 |
function decimals() public view virtual returns (uint8) {
|
||
| 84 |
√
|
return 18; |
|
| 85 |
} |
||
| 86 | |||
| 87 |
/** |
||
| 88 |
* @dev See {IERC20-totalSupply}.
|
||
| 89 |
*/ |
||
| 90 |
function totalSupply() public view virtual returns (uint256) {
|
||
| 91 |
√
|
⟳
|
return _totalSupply; |
| 92 |
} |
||
| 93 | |||
| 94 |
/** |
||
| 95 |
* @dev See {IERC20-balanceOf}.
|
||
| 96 |
*/ |
||
| 97 |
√
|
⟳
|
function balanceOf(address account) public view virtual returns (uint256) {
|
| 98 |
√
|
⟳
|
return _balances[account]; |
| 99 |
} |
||
| 100 | |||
| 101 |
/** |
||
| 102 |
* @dev See {IERC20-transfer}.
|
||
| 103 |
* |
||
| 104 |
* Requirements: |
||
| 105 |
* |
||
| 106 |
* - `to` cannot be the zero address. |
||
| 107 |
* - the caller must have a balance of at least `value`. |
||
| 108 |
*/ |
||
| 109 |
√
|
⟳
|
function transfer(address to, uint256 value) public virtual returns (bool) {
|
| 110 |
address owner = _msgSender(); |
||
| 111 |
√
|
⟳
|
_transfer(owner, to, value); |
| 112 |
return true; |
||
| 113 |
} |
||
| 114 | |||
| 115 |
/** |
||
| 116 |
* @dev See {IERC20-allowance}.
|
||
| 117 |
*/ |
||
| 118 |
function allowance(address owner, address spender) public view virtual returns (uint256) {
|
||
| 119 |
√
|
⟳
|
return _allowances[owner][spender]; |
| 120 |
} |
||
| 121 | |||
| 122 |
/** |
||
| 123 |
* @dev See {IERC20-approve}.
|
||
| 124 |
* |
||
| 125 |
* NOTE: If `value` is the maximum `uint256`, the allowance is not updated on |
||
| 126 |
* `transferFrom`. This is semantically equivalent to an infinite approval. |
||
| 127 |
* |
||
| 128 |
* Requirements: |
||
| 129 |
* |
||
| 130 |
* - `spender` cannot be the zero address. |
||
| 131 |
*/ |
||
| 132 |
√
|
⟳
|
function approve(address spender, uint256 value) public virtual returns (bool) {
|
| 133 |
address owner = _msgSender(); |
||
| 134 |
√
|
⟳
|
_approve(owner, spender, value); |
| 135 |
√
|
⟳
|
return true; |
| 136 |
} |
||
| 137 | |||
| 138 |
/** |
||
| 139 |
* @dev See {IERC20-transferFrom}.
|
||
| 140 |
* |
||
| 141 |
* Emits an {Approval} event indicating the updated allowance. This is not
|
||
| 142 |
* required by the EIP. See the note at the beginning of {ERC20}.
|
||
| 143 |
* |
||
| 144 |
* NOTE: Does not update the allowance if the current allowance |
||
| 145 |
* is the maximum `uint256`. |
||
| 146 |
* |
||
| 147 |
* Requirements: |
||
| 148 |
* |
||
| 149 |
* - `from` and `to` cannot be the zero address. |
||
| 150 |
* - `from` must have a balance of at least `value`. |
||
| 151 |
* - the caller must have allowance for ``from``'s tokens of at least |
||
| 152 |
* `value`. |
||
| 153 |
*/ |
||
| 154 |
√
|
⟳
|
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
|
| 155 |
address spender = _msgSender(); |
||
| 156 |
√
|
⟳
|
_spendAllowance(from, spender, value); |
| 157 |
√
|
⟳
|
_transfer(from, to, value); |
| 158 |
√
|
return true; |
|
| 159 |
} |
||
| 160 | |||
| 161 |
/** |
||
| 162 |
* @dev Moves a `value` amount of tokens from `from` to `to`. |
||
| 163 |
* |
||
| 164 |
* This internal function is equivalent to {transfer}, and can be used to
|
||
| 165 |
* e.g. implement automatic token fees, slashing mechanisms, etc. |
||
| 166 |
* |
||
| 167 |
* Emits a {Transfer} event.
|
||
| 168 |
* |
||
| 169 |
* NOTE: This function is not virtual, {_update} should be overridden instead.
|
||
| 170 |
*/ |
||
| 171 |
function _transfer(address from, address to, uint256 value) internal {
|
||
| 172 |
√
|
⟳
|
if (from == address(0)) {
|
| 173 |
revert ERC20InvalidSender(address(0)); |
||
| 174 |
} |
||
| 175 |
√
|
⟳
|
if (to == address(0)) {
|
| 176 |
⟳
|
revert ERC20InvalidReceiver(address(0)); |
|
| 177 |
} |
||
| 178 |
√
|
⟳
|
_update(from, to, value); |
| 179 |
} |
||
| 180 | |||
| 181 |
/** |
||
| 182 |
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` |
||
| 183 |
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding |
||
| 184 |
* this function. |
||
| 185 |
* |
||
| 186 |
* Emits a {Transfer} event.
|
||
| 187 |
*/ |
||
| 188 |
function _update(address from, address to, uint256 value) internal virtual {
|
||
| 189 |
√
|
⟳
|
if (from == address(0)) {
|
| 190 |
// Overflow check required: The rest of the code assumes that totalSupply never overflows |
||
| 191 |
√
|
_totalSupply += value; |
|
| 192 |
} else {
|
||
| 193 |
√
|
⟳
|
uint256 fromBalance = _balances[from]; |
| 194 |
√
|
⟳
|
if (fromBalance < value) {
|
| 195 |
⟳
|
revert ERC20InsufficientBalance(from, fromBalance, value); |
|
| 196 |
} |
||
| 197 |
unchecked {
|
||
| 198 |
// Overflow not possible: value <= fromBalance <= totalSupply. |
||
| 199 |
√
|
⟳
|
_balances[from] = fromBalance - value; |
| 200 |
} |
||
| 201 |
} |
||
| 202 | |||
| 203 |
√
|
⟳
|
if (to == address(0)) {
|
| 204 |
unchecked {
|
||
| 205 |
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. |
||
| 206 |
√
|
_totalSupply -= value; |
|
| 207 |
} |
||
| 208 |
} else {
|
||
| 209 |
unchecked {
|
||
| 210 |
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. |
||
| 211 |
√
|
⟳
|
_balances[to] += value; |
| 212 |
} |
||
| 213 |
} |
||
| 214 | |||
| 215 |
√
|
⟳
|
emit Transfer(from, to, value); |
| 216 |
} |
||
| 217 | |||
| 218 |
/** |
||
| 219 |
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). |
||
| 220 |
* Relies on the `_update` mechanism |
||
| 221 |
* |
||
| 222 |
* Emits a {Transfer} event with `from` set to the zero address.
|
||
| 223 |
* |
||
| 224 |
* NOTE: This function is not virtual, {_update} should be overridden instead.
|
||
| 225 |
*/ |
||
| 226 |
function _mint(address account, uint256 value) internal {
|
||
| 227 |
√
|
if (account == address(0)) {
|
|
| 228 |
revert ERC20InvalidReceiver(address(0)); |
||
| 229 |
} |
||
| 230 |
√
|
_update(address(0), account, value); |
|
| 231 |
} |
||
| 232 | |||
| 233 |
/** |
||
| 234 |
* @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. |
||
| 235 |
* Relies on the `_update` mechanism. |
||
| 236 |
* |
||
| 237 |
* Emits a {Transfer} event with `to` set to the zero address.
|
||
| 238 |
* |
||
| 239 |
* NOTE: This function is not virtual, {_update} should be overridden instead
|
||
| 240 |
*/ |
||
| 241 |
function _burn(address account, uint256 value) internal {
|
||
| 242 |
√
|
if (account == address(0)) {
|
|
| 243 |
revert ERC20InvalidSender(address(0)); |
||
| 244 |
} |
||
| 245 |
√
|
_update(account, address(0), value); |
|
| 246 |
} |
||
| 247 | |||
| 248 |
/** |
||
| 249 |
* @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. |
||
| 250 |
* |
||
| 251 |
* This internal function is equivalent to `approve`, and can be used to |
||
| 252 |
* e.g. set automatic allowances for certain subsystems, etc. |
||
| 253 |
* |
||
| 254 |
* Emits an {Approval} event.
|
||
| 255 |
* |
||
| 256 |
* Requirements: |
||
| 257 |
* |
||
| 258 |
* - `owner` cannot be the zero address. |
||
| 259 |
* - `spender` cannot be the zero address. |
||
| 260 |
* |
||
| 261 |
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. |
||
| 262 |
*/ |
||
| 263 |
function _approve(address owner, address spender, uint256 value) internal {
|
||
| 264 |
√
|
⟳
|
_approve(owner, spender, value, true); |
| 265 |
} |
||
| 266 | |||
| 267 |
/** |
||
| 268 |
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
|
||
| 269 |
* |
||
| 270 |
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
|
||
| 271 |
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any |
||
| 272 |
* `Approval` event during `transferFrom` operations. |
||
| 273 |
* |
||
| 274 |
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to |
||
| 275 |
* true using the following override: |
||
| 276 |
* ``` |
||
| 277 |
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
|
||
| 278 |
* super._approve(owner, spender, value, true); |
||
| 279 |
* } |
||
| 280 |
* ``` |
||
| 281 |
* |
||
| 282 |
* Requirements are the same as {_approve}.
|
||
| 283 |
*/ |
||
| 284 |
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
|
||
| 285 |
√
|
⟳
|
if (owner == address(0)) {
|
| 286 |
⟳
|
revert ERC20InvalidApprover(address(0)); |
|
| 287 |
} |
||
| 288 |
√
|
⟳
|
if (spender == address(0)) {
|
| 289 |
⟳
|
revert ERC20InvalidSpender(address(0)); |
|
| 290 |
} |
||
| 291 |
√
|
⟳
|
_allowances[owner][spender] = value; |
| 292 |
if (emitEvent) {
|
||
| 293 |
√
|
emit Approval(owner, spender, value); |
|
| 294 |
} |
||
| 295 |
} |
||
| 296 | |||
| 297 |
/** |
||
| 298 |
* @dev Updates `owner` s allowance for `spender` based on spent `value`. |
||
| 299 |
* |
||
| 300 |
* Does not update the allowance value in case of infinite allowance. |
||
| 301 |
* Revert if not enough allowance is available. |
||
| 302 |
* |
||
| 303 |
* Does not emit an {Approval} event.
|
||
| 304 |
*/ |
||
| 305 |
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
|
||
| 306 |
√
|
⟳
|
uint256 currentAllowance = allowance(owner, spender); |
| 307 |
√
|
⟳
|
if (currentAllowance != type(uint256).max) {
|
| 308 |
√
|
⟳
|
if (currentAllowance < value) {
|
| 309 |
⟳
|
revert ERC20InsufficientAllowance(spender, currentAllowance, value); |
|
| 310 |
} |
||
| 311 |
unchecked {
|
||
| 312 |
√
|
⟳
|
_approve(owner, spender, currentAllowance - value, false); |
| 313 |
} |
||
| 314 |
} |
||
| 315 |
} |
||
| 316 |
} |
||
| 317 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
/** |
||
| 7 |
* @dev Interface of the ERC20 standard as defined in the EIP. |
||
| 8 |
*/ |
||
| 9 |
interface IERC20 {
|
||
| 10 |
/** |
||
| 11 |
* @dev Emitted when `value` tokens are moved from one account (`from`) to |
||
| 12 |
* another (`to`). |
||
| 13 |
* |
||
| 14 |
* Note that `value` may be zero. |
||
| 15 |
*/ |
||
| 16 |
event Transfer(address indexed from, address indexed to, uint256 value); |
||
| 17 | |||
| 18 |
/** |
||
| 19 |
* @dev Emitted when the allowance of a `spender` for an `owner` is set by |
||
| 20 |
* a call to {approve}. `value` is the new allowance.
|
||
| 21 |
*/ |
||
| 22 |
event Approval(address indexed owner, address indexed spender, uint256 value); |
||
| 23 | |||
| 24 |
/** |
||
| 25 |
* @dev Returns the value of tokens in existence. |
||
| 26 |
*/ |
||
| 27 |
function totalSupply() external view returns (uint256); |
||
| 28 | |||
| 29 |
/** |
||
| 30 |
* @dev Returns the value of tokens owned by `account`. |
||
| 31 |
*/ |
||
| 32 |
function balanceOf(address account) external view returns (uint256); |
||
| 33 | |||
| 34 |
/** |
||
| 35 |
* @dev Moves a `value` amount of tokens from the caller's account to `to`. |
||
| 36 |
* |
||
| 37 |
* Returns a boolean value indicating whether the operation succeeded. |
||
| 38 |
* |
||
| 39 |
* Emits a {Transfer} event.
|
||
| 40 |
*/ |
||
| 41 |
function transfer(address to, uint256 value) external returns (bool); |
||
| 42 | |||
| 43 |
/** |
||
| 44 |
* @dev Returns the remaining number of tokens that `spender` will be |
||
| 45 |
* allowed to spend on behalf of `owner` through {transferFrom}. This is
|
||
| 46 |
* zero by default. |
||
| 47 |
* |
||
| 48 |
* This value changes when {approve} or {transferFrom} are called.
|
||
| 49 |
*/ |
||
| 50 |
function allowance(address owner, address spender) external view returns (uint256); |
||
| 51 | |||
| 52 |
/** |
||
| 53 |
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the |
||
| 54 |
* caller's tokens. |
||
| 55 |
* |
||
| 56 |
* Returns a boolean value indicating whether the operation succeeded. |
||
| 57 |
* |
||
| 58 |
* IMPORTANT: Beware that changing an allowance with this method brings the risk |
||
| 59 |
* that someone may use both the old and the new allowance by unfortunate |
||
| 60 |
* transaction ordering. One possible solution to mitigate this race |
||
| 61 |
* condition is to first reduce the spender's allowance to 0 and set the |
||
| 62 |
* desired value afterwards: |
||
| 63 |
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 |
||
| 64 |
* |
||
| 65 |
* Emits an {Approval} event.
|
||
| 66 |
*/ |
||
| 67 |
function approve(address spender, uint256 value) external returns (bool); |
||
| 68 | |||
| 69 |
/** |
||
| 70 |
* @dev Moves a `value` amount of tokens from `from` to `to` using the |
||
| 71 |
* allowance mechanism. `value` is then deducted from the caller's |
||
| 72 |
* allowance. |
||
| 73 |
* |
||
| 74 |
* Returns a boolean value indicating whether the operation succeeded. |
||
| 75 |
* |
||
| 76 |
* Emits a {Transfer} event.
|
||
| 77 |
*/ |
||
| 78 |
function transferFrom(address from, address to, uint256 value) external returns (bool); |
||
| 79 |
} |
||
| 80 |
| Lines covered: | 9 / 14 (64.3%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
import {IERC20Permit} from "./IERC20Permit.sol";
|
||
| 7 |
import {ERC20} from "../ERC20.sol";
|
||
| 8 |
import {ECDSA} from "../../../utils/cryptography/ECDSA.sol";
|
||
| 9 |
import {EIP712} from "../../../utils/cryptography/EIP712.sol";
|
||
| 10 |
import {Nonces} from "../../../utils/Nonces.sol";
|
||
| 11 | |||
| 12 |
/** |
||
| 13 |
* @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in |
||
| 14 |
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. |
||
| 15 |
* |
||
| 16 |
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
|
||
| 17 |
* presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
|
||
| 18 |
* need to send a transaction, and thus is not required to hold Ether at all. |
||
| 19 |
*/ |
||
| 20 |
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces {
|
||
| 21 |
bytes32 private constant PERMIT_TYPEHASH = |
||
| 22 |
⟳
|
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
|
|
| 23 | |||
| 24 |
/** |
||
| 25 |
* @dev Permit deadline has expired. |
||
| 26 |
*/ |
||
| 27 |
error ERC2612ExpiredSignature(uint256 deadline); |
||
| 28 | |||
| 29 |
/** |
||
| 30 |
* @dev Mismatched signature. |
||
| 31 |
*/ |
||
| 32 |
error ERC2612InvalidSigner(address signer, address owner); |
||
| 33 | |||
| 34 |
/** |
||
| 35 |
* @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
|
||
| 36 |
* |
||
| 37 |
* It's a good idea to use the same `name` that is defined as the ERC20 token name. |
||
| 38 |
*/ |
||
| 39 |
√
|
constructor(string memory name) EIP712(name, "1") {}
|
|
| 40 | |||
| 41 |
/** |
||
| 42 |
* @inheritdoc IERC20Permit |
||
| 43 |
*/ |
||
| 44 |
function permit( |
||
| 45 |
address owner, |
||
| 46 |
address spender, |
||
| 47 |
uint256 value, |
||
| 48 |
uint256 deadline, |
||
| 49 |
uint8 v, |
||
| 50 |
bytes32 r, |
||
| 51 |
bytes32 s |
||
| 52 |
) public virtual {
|
||
| 53 |
⟳
|
if (block.timestamp > deadline) {
|
|
| 54 |
⟳
|
revert ERC2612ExpiredSignature(deadline); |
|
| 55 |
} |
||
| 56 | |||
| 57 |
⟳
|
bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); |
|
| 58 | |||
| 59 |
⟳
|
bytes32 hash = _hashTypedDataV4(structHash); |
|
| 60 | |||
| 61 |
⟳
|
address signer = ECDSA.recover(hash, v, r, s); |
|
| 62 |
⟳
|
if (signer != owner) {
|
|
| 63 |
⟳
|
revert ERC2612InvalidSigner(signer, owner); |
|
| 64 |
} |
||
| 65 | |||
| 66 |
_approve(owner, spender, value); |
||
| 67 |
} |
||
| 68 | |||
| 69 |
/** |
||
| 70 |
* @inheritdoc IERC20Permit |
||
| 71 |
*/ |
||
| 72 |
function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) {
|
||
| 73 |
return super.nonces(owner); |
||
| 74 |
} |
||
| 75 | |||
| 76 |
/** |
||
| 77 |
* @inheritdoc IERC20Permit |
||
| 78 |
*/ |
||
| 79 |
// solhint-disable-next-line func-name-mixedcase |
||
| 80 |
function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {
|
||
| 81 |
return _domainSeparatorV4(); |
||
| 82 |
} |
||
| 83 |
} |
||
| 84 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
import {IERC20} from "../IERC20.sol";
|
||
| 7 | |||
| 8 |
/** |
||
| 9 |
* @dev Interface for the optional metadata functions from the ERC20 standard. |
||
| 10 |
*/ |
||
| 11 |
interface IERC20Metadata is IERC20 {
|
||
| 12 |
/** |
||
| 13 |
* @dev Returns the name of the token. |
||
| 14 |
*/ |
||
| 15 |
function name() external view returns (string memory); |
||
| 16 | |||
| 17 |
/** |
||
| 18 |
* @dev Returns the symbol of the token. |
||
| 19 |
*/ |
||
| 20 |
function symbol() external view returns (string memory); |
||
| 21 | |||
| 22 |
/** |
||
| 23 |
* @dev Returns the decimals places of the token. |
||
| 24 |
*/ |
||
| 25 |
function decimals() external view returns (uint8); |
||
| 26 |
} |
||
| 27 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
/** |
||
| 7 |
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in |
||
| 8 |
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. |
||
| 9 |
* |
||
| 10 |
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
|
||
| 11 |
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
|
||
| 12 |
* need to send a transaction, and thus is not required to hold Ether at all. |
||
| 13 |
* |
||
| 14 |
* ==== Security Considerations |
||
| 15 |
* |
||
| 16 |
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature |
||
| 17 |
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be |
||
| 18 |
* considered as an intention to spend the allowance in any specific way. The second is that because permits have |
||
| 19 |
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should |
||
| 20 |
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be |
||
| 21 |
* generally recommended is: |
||
| 22 |
* |
||
| 23 |
* ```solidity |
||
| 24 |
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
|
||
| 25 |
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
|
||
| 26 |
* doThing(..., value); |
||
| 27 |
* } |
||
| 28 |
* |
||
| 29 |
* function doThing(..., uint256 value) public {
|
||
| 30 |
* token.safeTransferFrom(msg.sender, address(this), value); |
||
| 31 |
* ... |
||
| 32 |
* } |
||
| 33 |
* ``` |
||
| 34 |
* |
||
| 35 |
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of |
||
| 36 |
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also |
||
| 37 |
* {SafeERC20-safeTransferFrom}).
|
||
| 38 |
* |
||
| 39 |
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so |
||
| 40 |
* contracts should have entry points that don't rely on permit. |
||
| 41 |
*/ |
||
| 42 |
interface IERC20Permit {
|
||
| 43 |
/** |
||
| 44 |
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, |
||
| 45 |
* given ``owner``'s signed approval. |
||
| 46 |
* |
||
| 47 |
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
|
||
| 48 |
* ordering also apply here. |
||
| 49 |
* |
||
| 50 |
* Emits an {Approval} event.
|
||
| 51 |
* |
||
| 52 |
* Requirements: |
||
| 53 |
* |
||
| 54 |
* - `spender` cannot be the zero address. |
||
| 55 |
* - `deadline` must be a timestamp in the future. |
||
| 56 |
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` |
||
| 57 |
* over the EIP712-formatted function arguments. |
||
| 58 |
* - the signature must use ``owner``'s current nonce (see {nonces}).
|
||
| 59 |
* |
||
| 60 |
* For more information on the signature format, see the |
||
| 61 |
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP |
||
| 62 |
* section]. |
||
| 63 |
* |
||
| 64 |
* CAUTION: See Security Considerations above. |
||
| 65 |
*/ |
||
| 66 |
function permit( |
||
| 67 |
address owner, |
||
| 68 |
address spender, |
||
| 69 |
uint256 value, |
||
| 70 |
uint256 deadline, |
||
| 71 |
uint8 v, |
||
| 72 |
bytes32 r, |
||
| 73 |
bytes32 s |
||
| 74 |
) external; |
||
| 75 | |||
| 76 |
/** |
||
| 77 |
* @dev Returns the current nonce for `owner`. This value must be |
||
| 78 |
* included whenever a signature is generated for {permit}.
|
||
| 79 |
* |
||
| 80 |
* Every successful call to {permit} increases ``owner``'s nonce by one. This
|
||
| 81 |
* prevents a signature from being used multiple times. |
||
| 82 |
*/ |
||
| 83 |
function nonces(address owner) external view returns (uint256); |
||
| 84 | |||
| 85 |
/** |
||
| 86 |
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
|
||
| 87 |
*/ |
||
| 88 |
// solhint-disable-next-line func-name-mixedcase |
||
| 89 |
function DOMAIN_SEPARATOR() external view returns (bytes32); |
||
| 90 |
} |
||
| 91 |
| Lines covered: | 3 / 5 (60.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
import {IERC20} from "../IERC20.sol";
|
||
| 7 |
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
|
||
| 8 |
import {Address} from "../../../utils/Address.sol";
|
||
| 9 | |||
| 10 |
/** |
||
| 11 |
* @title SafeERC20 |
||
| 12 |
* @dev Wrappers around ERC20 operations that throw on failure (when the token |
||
| 13 |
* contract returns false). Tokens that return no value (and instead revert or |
||
| 14 |
* throw on failure) are also supported, non-reverting calls are assumed to be |
||
| 15 |
* successful. |
||
| 16 |
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, |
||
| 17 |
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc. |
||
| 18 |
*/ |
||
| 19 |
library SafeERC20 {
|
||
| 20 |
using Address for address; |
||
| 21 | |||
| 22 |
/** |
||
| 23 |
* @dev An operation with an ERC20 token failed. |
||
| 24 |
*/ |
||
| 25 |
error SafeERC20FailedOperation(address token); |
||
| 26 | |||
| 27 |
/** |
||
| 28 |
* @dev Indicates a failed `decreaseAllowance` request. |
||
| 29 |
*/ |
||
| 30 |
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); |
||
| 31 | |||
| 32 |
/** |
||
| 33 |
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, |
||
| 34 |
* non-reverting calls are assumed to be successful. |
||
| 35 |
*/ |
||
| 36 |
function safeTransfer(IERC20 token, address to, uint256 value) internal {
|
||
| 37 |
√
|
⟳
|
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); |
| 38 |
} |
||
| 39 | |||
| 40 |
/** |
||
| 41 |
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the |
||
| 42 |
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. |
||
| 43 |
*/ |
||
| 44 |
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
|
||
| 45 |
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); |
||
| 46 |
} |
||
| 47 | |||
| 48 |
/** |
||
| 49 |
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, |
||
| 50 |
* non-reverting calls are assumed to be successful. |
||
| 51 |
*/ |
||
| 52 |
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
|
||
| 53 |
uint256 oldAllowance = token.allowance(address(this), spender); |
||
| 54 |
forceApprove(token, spender, oldAllowance + value); |
||
| 55 |
} |
||
| 56 | |||
| 57 |
/** |
||
| 58 |
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no |
||
| 59 |
* value, non-reverting calls are assumed to be successful. |
||
| 60 |
*/ |
||
| 61 |
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
|
||
| 62 |
unchecked {
|
||
| 63 |
uint256 currentAllowance = token.allowance(address(this), spender); |
||
| 64 |
if (currentAllowance < requestedDecrease) {
|
||
| 65 |
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); |
||
| 66 |
} |
||
| 67 |
forceApprove(token, spender, currentAllowance - requestedDecrease); |
||
| 68 |
} |
||
| 69 |
} |
||
| 70 | |||
| 71 |
/** |
||
| 72 |
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, |
||
| 73 |
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval |
||
| 74 |
* to be set to zero before setting it to a non-zero value, such as USDT. |
||
| 75 |
*/ |
||
| 76 |
function forceApprove(IERC20 token, address spender, uint256 value) internal {
|
||
| 77 |
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); |
||
| 78 | |||
| 79 |
if (!_callOptionalReturnBool(token, approvalCall)) {
|
||
| 80 |
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); |
||
| 81 |
_callOptionalReturn(token, approvalCall); |
||
| 82 |
} |
||
| 83 |
} |
||
| 84 | |||
| 85 |
/** |
||
| 86 |
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement |
||
| 87 |
* on the return value: the return value is optional (but if data is returned, it must not be false). |
||
| 88 |
* @param token The token targeted by the call. |
||
| 89 |
* @param data The call data (encoded using abi.encode or one of its variants). |
||
| 90 |
*/ |
||
| 91 |
function _callOptionalReturn(IERC20 token, bytes memory data) private {
|
||
| 92 |
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since |
||
| 93 |
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
|
||
| 94 |
// the target address contains contract code and also asserts for success in the low-level call. |
||
| 95 | |||
| 96 |
√
|
⟳
|
bytes memory returndata = address(token).functionCall(data); |
| 97 |
√
|
⟳
|
if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
|
| 98 |
revert SafeERC20FailedOperation(address(token)); |
||
| 99 |
} |
||
| 100 |
} |
||
| 101 | |||
| 102 |
/** |
||
| 103 |
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement |
||
| 104 |
* on the return value: the return value is optional (but if data is returned, it must not be false). |
||
| 105 |
* @param token The token targeted by the call. |
||
| 106 |
* @param data The call data (encoded using abi.encode or one of its variants). |
||
| 107 |
* |
||
| 108 |
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
|
||
| 109 |
*/ |
||
| 110 |
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
|
||
| 111 |
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since |
||
| 112 |
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
|
||
| 113 |
// and not revert is the subcall reverts. |
||
| 114 | |||
| 115 |
(bool success, bytes memory returndata) = address(token).call(data); |
||
| 116 |
return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; |
||
| 117 |
} |
||
| 118 |
} |
||
| 119 |
| Lines covered: | 14 / 18 (77.8%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
/** |
||
| 7 |
* @dev Collection of functions related to the address type |
||
| 8 |
*/ |
||
| 9 |
library Address {
|
||
| 10 |
/** |
||
| 11 |
* @dev The ETH balance of the account is not enough to perform the operation. |
||
| 12 |
*/ |
||
| 13 |
error AddressInsufficientBalance(address account); |
||
| 14 | |||
| 15 |
/** |
||
| 16 |
* @dev There's no code at `target` (it is not a contract). |
||
| 17 |
*/ |
||
| 18 |
error AddressEmptyCode(address target); |
||
| 19 | |||
| 20 |
/** |
||
| 21 |
* @dev A call to an address target failed. The target may have reverted. |
||
| 22 |
*/ |
||
| 23 |
error FailedInnerCall(); |
||
| 24 | |||
| 25 |
/** |
||
| 26 |
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to |
||
| 27 |
* `recipient`, forwarding all available gas and reverting on errors. |
||
| 28 |
* |
||
| 29 |
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost |
||
| 30 |
* of certain opcodes, possibly making contracts go over the 2300 gas limit |
||
| 31 |
* imposed by `transfer`, making them unable to receive funds via |
||
| 32 |
* `transfer`. {sendValue} removes this limitation.
|
||
| 33 |
* |
||
| 34 |
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. |
||
| 35 |
* |
||
| 36 |
* IMPORTANT: because control is transferred to `recipient`, care must be |
||
| 37 |
* taken to not create reentrancy vulnerabilities. Consider using |
||
| 38 |
* {ReentrancyGuard} or the
|
||
| 39 |
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. |
||
| 40 |
*/ |
||
| 41 |
function sendValue(address payable recipient, uint256 amount) internal {
|
||
| 42 |
if (address(this).balance < amount) {
|
||
| 43 |
revert AddressInsufficientBalance(address(this)); |
||
| 44 |
} |
||
| 45 | |||
| 46 |
(bool success, ) = recipient.call{value: amount}("");
|
||
| 47 |
if (!success) {
|
||
| 48 |
revert FailedInnerCall(); |
||
| 49 |
} |
||
| 50 |
} |
||
| 51 | |||
| 52 |
/** |
||
| 53 |
* @dev Performs a Solidity function call using a low level `call`. A |
||
| 54 |
* plain `call` is an unsafe replacement for a function call: use this |
||
| 55 |
* function instead. |
||
| 56 |
* |
||
| 57 |
* If `target` reverts with a revert reason or custom error, it is bubbled |
||
| 58 |
* up by this function (like regular Solidity function calls). However, if |
||
| 59 |
* the call reverted with no returned reason, this function reverts with a |
||
| 60 |
* {FailedInnerCall} error.
|
||
| 61 |
* |
||
| 62 |
* Returns the raw returned data. To convert to the expected return value, |
||
| 63 |
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. |
||
| 64 |
* |
||
| 65 |
* Requirements: |
||
| 66 |
* |
||
| 67 |
* - `target` must be a contract. |
||
| 68 |
* - calling `target` with `data` must not revert. |
||
| 69 |
*/ |
||
| 70 |
√
|
⟳
|
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
|
| 71 |
√
|
⟳
|
return functionCallWithValue(target, data, 0); |
| 72 |
} |
||
| 73 | |||
| 74 |
/** |
||
| 75 |
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
|
||
| 76 |
* but also transferring `value` wei to `target`. |
||
| 77 |
* |
||
| 78 |
* Requirements: |
||
| 79 |
* |
||
| 80 |
* - the calling contract must have an ETH balance of at least `value`. |
||
| 81 |
* - the called Solidity function must be `payable`. |
||
| 82 |
*/ |
||
| 83 |
√
|
⟳
|
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
|
| 84 |
√
|
⟳
|
if (address(this).balance < value) {
|
| 85 |
revert AddressInsufficientBalance(address(this)); |
||
| 86 |
} |
||
| 87 |
√
|
⟳
|
(bool success, bytes memory returndata) = target.call{value: value}(data);
|
| 88 |
√
|
⟳
|
return verifyCallResultFromTarget(target, success, returndata); |
| 89 |
} |
||
| 90 | |||
| 91 |
/** |
||
| 92 |
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
|
||
| 93 |
* but performing a static call. |
||
| 94 |
*/ |
||
| 95 |
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
|
||
| 96 |
(bool success, bytes memory returndata) = target.staticcall(data); |
||
| 97 |
return verifyCallResultFromTarget(target, success, returndata); |
||
| 98 |
} |
||
| 99 | |||
| 100 |
/** |
||
| 101 |
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
|
||
| 102 |
* but performing a delegate call. |
||
| 103 |
*/ |
||
| 104 |
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
|
||
| 105 |
(bool success, bytes memory returndata) = target.delegatecall(data); |
||
| 106 |
return verifyCallResultFromTarget(target, success, returndata); |
||
| 107 |
} |
||
| 108 | |||
| 109 |
/** |
||
| 110 |
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target |
||
| 111 |
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
|
||
| 112 |
* unsuccessful call. |
||
| 113 |
*/ |
||
| 114 |
function verifyCallResultFromTarget( |
||
| 115 |
address target, |
||
| 116 |
bool success, |
||
| 117 |
bytes memory returndata |
||
| 118 |
√
|
⟳
|
) internal view returns (bytes memory) {
|
| 119 |
√
|
⟳
|
if (!success) {
|
| 120 |
⟳
|
_revert(returndata); |
|
| 121 |
} else {
|
||
| 122 |
// only check if target is a contract if the call was successful and the return data is empty |
||
| 123 |
// otherwise we already know that it was a contract |
||
| 124 |
√
|
⟳
|
if (returndata.length == 0 && target.code.length == 0) {
|
| 125 |
revert AddressEmptyCode(target); |
||
| 126 |
} |
||
| 127 |
√
|
⟳
|
return returndata; |
| 128 |
} |
||
| 129 |
} |
||
| 130 | |||
| 131 |
/** |
||
| 132 |
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the |
||
| 133 |
* revert reason or with a default {FailedInnerCall} error.
|
||
| 134 |
*/ |
||
| 135 |
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
|
||
| 136 |
if (!success) {
|
||
| 137 |
_revert(returndata); |
||
| 138 |
} else {
|
||
| 139 |
return returndata; |
||
| 140 |
} |
||
| 141 |
} |
||
| 142 | |||
| 143 |
/** |
||
| 144 |
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
|
||
| 145 |
*/ |
||
| 146 |
function _revert(bytes memory returndata) private pure {
|
||
| 147 |
// Look for revert reason and bubble it up if present |
||
| 148 |
⟳
|
if (returndata.length > 0) {
|
|
| 149 |
// The easiest way to bubble the revert reason is using memory via assembly |
||
| 150 |
/// @solidity memory-safe-assembly |
||
| 151 |
assembly {
|
||
| 152 |
⟳
|
let returndata_size := mload(returndata) |
|
| 153 |
⟳
|
revert(add(32, returndata), returndata_size) |
|
| 154 |
} |
||
| 155 |
} else {
|
||
| 156 |
revert FailedInnerCall(); |
||
| 157 |
} |
||
| 158 |
} |
||
| 159 |
} |
||
| 160 |
| Lines covered: | 1 / 1 (100.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
/** |
||
| 7 |
* @dev Provides information about the current execution context, including the |
||
| 8 |
* sender of the transaction and its data. While these are generally available |
||
| 9 |
* via msg.sender and msg.data, they should not be accessed in such a direct |
||
| 10 |
* manner, since when dealing with meta-transactions the account sending and |
||
| 11 |
* paying for execution may not be the actual sender (as far as an application |
||
| 12 |
* is concerned). |
||
| 13 |
* |
||
| 14 |
* This contract is only required for intermediate, library-like contracts. |
||
| 15 |
*/ |
||
| 16 |
abstract contract Context {
|
||
| 17 |
function _msgSender() internal view virtual returns (address) {
|
||
| 18 |
√
|
⟳
|
return msg.sender; |
| 19 |
} |
||
| 20 | |||
| 21 |
function _msgData() internal view virtual returns (bytes calldata) {
|
||
| 22 |
return msg.data; |
||
| 23 |
} |
||
| 24 | |||
| 25 |
function _contextSuffixLength() internal view virtual returns (uint256) {
|
||
| 26 |
return 0; |
||
| 27 |
} |
||
| 28 |
} |
||
| 29 |
| Lines covered: | 2 / 3 (66.7%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) |
||
| 3 |
pragma solidity ^0.8.20; |
||
| 4 | |||
| 5 |
/** |
||
| 6 |
* @dev Provides tracking nonces for addresses. Nonces will only increment. |
||
| 7 |
*/ |
||
| 8 |
abstract contract Nonces {
|
||
| 9 |
/** |
||
| 10 |
* @dev The nonce used for an `account` is not the expected current nonce. |
||
| 11 |
*/ |
||
| 12 |
error InvalidAccountNonce(address account, uint256 currentNonce); |
||
| 13 | |||
| 14 |
mapping(address account => uint256) private _nonces; |
||
| 15 | |||
| 16 |
/** |
||
| 17 |
* @dev Returns the next unused nonce for an address. |
||
| 18 |
*/ |
||
| 19 |
function nonces(address owner) public view virtual returns (uint256) {
|
||
| 20 |
return _nonces[owner]; |
||
| 21 |
} |
||
| 22 | |||
| 23 |
/** |
||
| 24 |
* @dev Consumes a nonce. |
||
| 25 |
* |
||
| 26 |
* Returns the current value and increments nonce. |
||
| 27 |
*/ |
||
| 28 |
⟳
|
function _useNonce(address owner) internal virtual returns (uint256) {
|
|
| 29 |
// For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be |
||
| 30 |
// decremented or reset. This guarantees that the nonce never overflows. |
||
| 31 |
unchecked {
|
||
| 32 |
// It is important to do x++ and not ++x here. |
||
| 33 |
⟳
|
return _nonces[owner]++; |
|
| 34 |
} |
||
| 35 |
} |
||
| 36 | |||
| 37 |
/** |
||
| 38 |
* @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
|
||
| 39 |
*/ |
||
| 40 |
function _useCheckedNonce(address owner, uint256 nonce) internal virtual {
|
||
| 41 |
uint256 current = _useNonce(owner); |
||
| 42 |
if (nonce != current) {
|
||
| 43 |
revert InvalidAccountNonce(owner, current); |
||
| 44 |
} |
||
| 45 |
} |
||
| 46 |
} |
||
| 47 |
| Lines covered: | 8 / 9 (88.9%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
/** |
||
| 7 |
* @dev Contract module that helps prevent reentrant calls to a function. |
||
| 8 |
* |
||
| 9 |
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
|
||
| 10 |
* available, which can be applied to functions to make sure there are no nested |
||
| 11 |
* (reentrant) calls to them. |
||
| 12 |
* |
||
| 13 |
* Note that because there is a single `nonReentrant` guard, functions marked as |
||
| 14 |
* `nonReentrant` may not call one another. This can be worked around by making |
||
| 15 |
* those functions `private`, and then adding `external` `nonReentrant` entry |
||
| 16 |
* points to them. |
||
| 17 |
* |
||
| 18 |
* TIP: If you would like to learn more about reentrancy and alternative ways |
||
| 19 |
* to protect against it, check out our blog post |
||
| 20 |
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. |
||
| 21 |
*/ |
||
| 22 |
abstract contract ReentrancyGuard {
|
||
| 23 |
// Booleans are more expensive than uint256 or any type that takes up a full |
||
| 24 |
// word because each write operation emits an extra SLOAD to first read the |
||
| 25 |
// slot's contents, replace the bits taken up by the boolean, and then write |
||
| 26 |
// back. This is the compiler's defense against contract upgrades and |
||
| 27 |
// pointer aliasing, and it cannot be disabled. |
||
| 28 | |||
| 29 |
// The values being non-zero value makes deployment a bit more expensive, |
||
| 30 |
// but in exchange the refund on every call to nonReentrant will be lower in |
||
| 31 |
// amount. Since refunds are capped to a percentage of the total |
||
| 32 |
// transaction's gas, it is best to keep them low in cases like this one, to |
||
| 33 |
// increase the likelihood of the full refund coming into effect. |
||
| 34 |
√
|
uint256 private constant NOT_ENTERED = 1; |
|
| 35 |
√
|
⟳
|
uint256 private constant ENTERED = 2; |
| 36 | |||
| 37 |
uint256 private _status; |
||
| 38 | |||
| 39 |
/** |
||
| 40 |
* @dev Unauthorized reentrant call. |
||
| 41 |
*/ |
||
| 42 |
error ReentrancyGuardReentrantCall(); |
||
| 43 | |||
| 44 |
constructor() {
|
||
| 45 |
√
|
_status = NOT_ENTERED; |
|
| 46 |
} |
||
| 47 | |||
| 48 |
/** |
||
| 49 |
* @dev Prevents a contract from calling itself, directly or indirectly. |
||
| 50 |
* Calling a `nonReentrant` function from another `nonReentrant` |
||
| 51 |
* function is not supported. It is possible to prevent this from happening |
||
| 52 |
* by making the `nonReentrant` function external, and making it call a |
||
| 53 |
* `private` function that does the actual work. |
||
| 54 |
*/ |
||
| 55 |
modifier nonReentrant() {
|
||
| 56 |
√
|
⟳
|
_nonReentrantBefore(); |
| 57 |
_; |
||
| 58 |
√
|
⟳
|
_nonReentrantAfter(); |
| 59 |
} |
||
| 60 | |||
| 61 |
function _nonReentrantBefore() private {
|
||
| 62 |
// On the first call to nonReentrant, _status will be NOT_ENTERED |
||
| 63 |
√
|
⟳
|
if (_status == ENTERED) {
|
| 64 |
revert ReentrancyGuardReentrantCall(); |
||
| 65 |
} |
||
| 66 | |||
| 67 |
// Any calls to nonReentrant after this point will fail |
||
| 68 |
√
|
⟳
|
_status = ENTERED; |
| 69 |
} |
||
| 70 | |||
| 71 |
function _nonReentrantAfter() private {
|
||
| 72 |
// By storing the original value once again, a refund is triggered (see |
||
| 73 |
// https://eips.ethereum.org/EIPS/eip-2200) |
||
| 74 |
√
|
_status = NOT_ENTERED; |
|
| 75 |
} |
||
| 76 | |||
| 77 |
/** |
||
| 78 |
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a |
||
| 79 |
* `nonReentrant` function in the call stack. |
||
| 80 |
*/ |
||
| 81 |
function _reentrancyGuardEntered() internal view returns (bool) {
|
||
| 82 |
return _status == ENTERED; |
||
| 83 |
} |
||
| 84 |
} |
||
| 85 |
| Lines covered: | 7 / 24 (29.2%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
import {StorageSlot} from "./StorageSlot.sol";
|
||
| 7 | |||
| 8 |
// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
||
| 9 |
// | length | 0x BB | |
||
| 10 |
type ShortString is bytes32; |
||
| 11 | |||
| 12 |
/** |
||
| 13 |
* @dev This library provides functions to convert short memory strings |
||
| 14 |
* into a `ShortString` type that can be used as an immutable variable. |
||
| 15 |
* |
||
| 16 |
* Strings of arbitrary length can be optimized using this library if |
||
| 17 |
* they are short enough (up to 31 bytes) by packing them with their |
||
| 18 |
* length (1 byte) in a single EVM word (32 bytes). Additionally, a |
||
| 19 |
* fallback mechanism can be used for every other case. |
||
| 20 |
* |
||
| 21 |
* Usage example: |
||
| 22 |
* |
||
| 23 |
* ```solidity |
||
| 24 |
* contract Named {
|
||
| 25 |
* using ShortStrings for *; |
||
| 26 |
* |
||
| 27 |
* ShortString private immutable _name; |
||
| 28 |
* string private _nameFallback; |
||
| 29 |
* |
||
| 30 |
* constructor(string memory contractName) {
|
||
| 31 |
* _name = contractName.toShortStringWithFallback(_nameFallback); |
||
| 32 |
* } |
||
| 33 |
* |
||
| 34 |
* function name() external view returns (string memory) {
|
||
| 35 |
* return _name.toStringWithFallback(_nameFallback); |
||
| 36 |
* } |
||
| 37 |
* } |
||
| 38 |
* ``` |
||
| 39 |
*/ |
||
| 40 |
library ShortStrings {
|
||
| 41 |
// Used as an identifier for strings longer than 31 bytes. |
||
| 42 |
bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; |
||
| 43 | |||
| 44 |
error StringTooLong(string str); |
||
| 45 |
error InvalidShortString(); |
||
| 46 | |||
| 47 |
/** |
||
| 48 |
* @dev Encode a string of at most 31 chars into a `ShortString`. |
||
| 49 |
* |
||
| 50 |
* This will trigger a `StringTooLong` error is the input string is too long. |
||
| 51 |
*/ |
||
| 52 |
√
|
function toShortString(string memory str) internal pure returns (ShortString) {
|
|
| 53 |
√
|
bytes memory bstr = bytes(str); |
|
| 54 |
√
|
if (bstr.length > 31) {
|
|
| 55 |
revert StringTooLong(str); |
||
| 56 |
} |
||
| 57 |
√
|
return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); |
|
| 58 |
} |
||
| 59 | |||
| 60 |
/** |
||
| 61 |
* @dev Decode a `ShortString` back to a "normal" string. |
||
| 62 |
*/ |
||
| 63 |
function toString(ShortString sstr) internal pure returns (string memory) {
|
||
| 64 |
uint256 len = byteLength(sstr); |
||
| 65 |
// using `new string(len)` would work locally but is not memory safe. |
||
| 66 |
string memory str = new string(32); |
||
| 67 |
/// @solidity memory-safe-assembly |
||
| 68 |
assembly {
|
||
| 69 |
mstore(str, len) |
||
| 70 |
mstore(add(str, 0x20), sstr) |
||
| 71 |
} |
||
| 72 |
return str; |
||
| 73 |
} |
||
| 74 | |||
| 75 |
/** |
||
| 76 |
* @dev Return the length of a `ShortString`. |
||
| 77 |
*/ |
||
| 78 |
function byteLength(ShortString sstr) internal pure returns (uint256) {
|
||
| 79 |
uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; |
||
| 80 |
if (result > 31) {
|
||
| 81 |
revert InvalidShortString(); |
||
| 82 |
} |
||
| 83 |
return result; |
||
| 84 |
} |
||
| 85 | |||
| 86 |
/** |
||
| 87 |
* @dev Encode a string into a `ShortString`, or write it to storage if it is too long. |
||
| 88 |
*/ |
||
| 89 |
√
|
function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
|
|
| 90 |
√
|
if (bytes(value).length < 32) {
|
|
| 91 |
√
|
return toShortString(value); |
|
| 92 |
} else {
|
||
| 93 |
StorageSlot.getStringSlot(store).value = value; |
||
| 94 |
return ShortString.wrap(FALLBACK_SENTINEL); |
||
| 95 |
} |
||
| 96 |
} |
||
| 97 | |||
| 98 |
/** |
||
| 99 |
* @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
|
||
| 100 |
*/ |
||
| 101 |
function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
|
||
| 102 |
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
|
||
| 103 |
return toString(value); |
||
| 104 |
} else {
|
||
| 105 |
return store; |
||
| 106 |
} |
||
| 107 |
} |
||
| 108 | |||
| 109 |
/** |
||
| 110 |
* @dev Return the length of a string that was encoded to `ShortString` or written to storage using |
||
| 111 |
* {setWithFallback}.
|
||
| 112 |
* |
||
| 113 |
* WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of |
||
| 114 |
* actual characters as the UTF-8 encoding of a single character can span over multiple bytes. |
||
| 115 |
*/ |
||
| 116 |
function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
|
||
| 117 |
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
|
||
| 118 |
return byteLength(value); |
||
| 119 |
} else {
|
||
| 120 |
return bytes(store).length; |
||
| 121 |
} |
||
| 122 |
} |
||
| 123 |
} |
||
| 124 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) |
||
| 3 |
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js. |
||
| 4 | |||
| 5 |
pragma solidity ^0.8.20; |
||
| 6 | |||
| 7 |
/** |
||
| 8 |
* @dev Library for reading and writing primitive types to specific storage slots. |
||
| 9 |
* |
||
| 10 |
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. |
||
| 11 |
* This library helps with reading and writing to such slots without the need for inline assembly. |
||
| 12 |
* |
||
| 13 |
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write. |
||
| 14 |
* |
||
| 15 |
* Example usage to set ERC1967 implementation slot: |
||
| 16 |
* ```solidity |
||
| 17 |
* contract ERC1967 {
|
||
| 18 |
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; |
||
| 19 |
* |
||
| 20 |
* function _getImplementation() internal view returns (address) {
|
||
| 21 |
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; |
||
| 22 |
* } |
||
| 23 |
* |
||
| 24 |
* function _setImplementation(address newImplementation) internal {
|
||
| 25 |
* require(newImplementation.code.length > 0); |
||
| 26 |
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; |
||
| 27 |
* } |
||
| 28 |
* } |
||
| 29 |
* ``` |
||
| 30 |
*/ |
||
| 31 |
library StorageSlot {
|
||
| 32 |
struct AddressSlot {
|
||
| 33 |
address value; |
||
| 34 |
} |
||
| 35 | |||
| 36 |
struct BooleanSlot {
|
||
| 37 |
bool value; |
||
| 38 |
} |
||
| 39 | |||
| 40 |
struct Bytes32Slot {
|
||
| 41 |
bytes32 value; |
||
| 42 |
} |
||
| 43 | |||
| 44 |
struct Uint256Slot {
|
||
| 45 |
uint256 value; |
||
| 46 |
} |
||
| 47 | |||
| 48 |
struct StringSlot {
|
||
| 49 |
string value; |
||
| 50 |
} |
||
| 51 | |||
| 52 |
struct BytesSlot {
|
||
| 53 |
bytes value; |
||
| 54 |
} |
||
| 55 | |||
| 56 |
/** |
||
| 57 |
* @dev Returns an `AddressSlot` with member `value` located at `slot`. |
||
| 58 |
*/ |
||
| 59 |
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
|
||
| 60 |
/// @solidity memory-safe-assembly |
||
| 61 |
assembly {
|
||
| 62 |
r.slot := slot |
||
| 63 |
} |
||
| 64 |
} |
||
| 65 | |||
| 66 |
/** |
||
| 67 |
* @dev Returns an `BooleanSlot` with member `value` located at `slot`. |
||
| 68 |
*/ |
||
| 69 |
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
|
||
| 70 |
/// @solidity memory-safe-assembly |
||
| 71 |
assembly {
|
||
| 72 |
r.slot := slot |
||
| 73 |
} |
||
| 74 |
} |
||
| 75 | |||
| 76 |
/** |
||
| 77 |
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`. |
||
| 78 |
*/ |
||
| 79 |
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
|
||
| 80 |
/// @solidity memory-safe-assembly |
||
| 81 |
assembly {
|
||
| 82 |
r.slot := slot |
||
| 83 |
} |
||
| 84 |
} |
||
| 85 | |||
| 86 |
/** |
||
| 87 |
* @dev Returns an `Uint256Slot` with member `value` located at `slot`. |
||
| 88 |
*/ |
||
| 89 |
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
|
||
| 90 |
/// @solidity memory-safe-assembly |
||
| 91 |
assembly {
|
||
| 92 |
r.slot := slot |
||
| 93 |
} |
||
| 94 |
} |
||
| 95 | |||
| 96 |
/** |
||
| 97 |
* @dev Returns an `StringSlot` with member `value` located at `slot`. |
||
| 98 |
*/ |
||
| 99 |
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
|
||
| 100 |
/// @solidity memory-safe-assembly |
||
| 101 |
assembly {
|
||
| 102 |
r.slot := slot |
||
| 103 |
} |
||
| 104 |
} |
||
| 105 | |||
| 106 |
/** |
||
| 107 |
* @dev Returns an `StringSlot` representation of the string storage pointer `store`. |
||
| 108 |
*/ |
||
| 109 |
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
|
||
| 110 |
/// @solidity memory-safe-assembly |
||
| 111 |
assembly {
|
||
| 112 |
r.slot := store.slot |
||
| 113 |
} |
||
| 114 |
} |
||
| 115 | |||
| 116 |
/** |
||
| 117 |
* @dev Returns an `BytesSlot` with member `value` located at `slot`. |
||
| 118 |
*/ |
||
| 119 |
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
|
||
| 120 |
/// @solidity memory-safe-assembly |
||
| 121 |
assembly {
|
||
| 122 |
r.slot := slot |
||
| 123 |
} |
||
| 124 |
} |
||
| 125 | |||
| 126 |
/** |
||
| 127 |
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. |
||
| 128 |
*/ |
||
| 129 |
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
|
||
| 130 |
/// @solidity memory-safe-assembly |
||
| 131 |
assembly {
|
||
| 132 |
r.slot := store.slot |
||
| 133 |
} |
||
| 134 |
} |
||
| 135 |
} |
||
| 136 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
import {Math} from "./math/Math.sol";
|
||
| 7 |
import {SignedMath} from "./math/SignedMath.sol";
|
||
| 8 | |||
| 9 |
/** |
||
| 10 |
* @dev String operations. |
||
| 11 |
*/ |
||
| 12 |
library Strings {
|
||
| 13 |
bytes16 private constant HEX_DIGITS = "0123456789abcdef"; |
||
| 14 |
uint8 private constant ADDRESS_LENGTH = 20; |
||
| 15 | |||
| 16 |
/** |
||
| 17 |
* @dev The `value` string doesn't fit in the specified `length`. |
||
| 18 |
*/ |
||
| 19 |
error StringsInsufficientHexLength(uint256 value, uint256 length); |
||
| 20 | |||
| 21 |
/** |
||
| 22 |
* @dev Converts a `uint256` to its ASCII `string` decimal representation. |
||
| 23 |
*/ |
||
| 24 |
function toString(uint256 value) internal pure returns (string memory) {
|
||
| 25 |
unchecked {
|
||
| 26 |
uint256 length = Math.log10(value) + 1; |
||
| 27 |
string memory buffer = new string(length); |
||
| 28 |
uint256 ptr; |
||
| 29 |
/// @solidity memory-safe-assembly |
||
| 30 |
assembly {
|
||
| 31 |
ptr := add(buffer, add(32, length)) |
||
| 32 |
} |
||
| 33 |
while (true) {
|
||
| 34 |
ptr--; |
||
| 35 |
/// @solidity memory-safe-assembly |
||
| 36 |
assembly {
|
||
| 37 |
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) |
||
| 38 |
} |
||
| 39 |
value /= 10; |
||
| 40 |
if (value == 0) break; |
||
| 41 |
} |
||
| 42 |
return buffer; |
||
| 43 |
} |
||
| 44 |
} |
||
| 45 | |||
| 46 |
/** |
||
| 47 |
* @dev Converts a `int256` to its ASCII `string` decimal representation. |
||
| 48 |
*/ |
||
| 49 |
function toStringSigned(int256 value) internal pure returns (string memory) {
|
||
| 50 |
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); |
||
| 51 |
} |
||
| 52 | |||
| 53 |
/** |
||
| 54 |
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. |
||
| 55 |
*/ |
||
| 56 |
function toHexString(uint256 value) internal pure returns (string memory) {
|
||
| 57 |
unchecked {
|
||
| 58 |
return toHexString(value, Math.log256(value) + 1); |
||
| 59 |
} |
||
| 60 |
} |
||
| 61 | |||
| 62 |
/** |
||
| 63 |
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. |
||
| 64 |
*/ |
||
| 65 |
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
|
||
| 66 |
uint256 localValue = value; |
||
| 67 |
bytes memory buffer = new bytes(2 * length + 2); |
||
| 68 |
buffer[0] = "0"; |
||
| 69 |
buffer[1] = "x"; |
||
| 70 |
for (uint256 i = 2 * length + 1; i > 1; --i) {
|
||
| 71 |
buffer[i] = HEX_DIGITS[localValue & 0xf]; |
||
| 72 |
localValue >>= 4; |
||
| 73 |
} |
||
| 74 |
if (localValue != 0) {
|
||
| 75 |
revert StringsInsufficientHexLength(value, length); |
||
| 76 |
} |
||
| 77 |
return string(buffer); |
||
| 78 |
} |
||
| 79 | |||
| 80 |
/** |
||
| 81 |
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal |
||
| 82 |
* representation. |
||
| 83 |
*/ |
||
| 84 |
function toHexString(address addr) internal pure returns (string memory) {
|
||
| 85 |
return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); |
||
| 86 |
} |
||
| 87 | |||
| 88 |
/** |
||
| 89 |
* @dev Returns true if the two strings are equal. |
||
| 90 |
*/ |
||
| 91 |
function equal(string memory a, string memory b) internal pure returns (bool) {
|
||
| 92 |
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); |
||
| 93 |
} |
||
| 94 |
} |
||
| 95 |
| Lines covered: | 17 / 19 (89.5%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
/** |
||
| 7 |
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. |
||
| 8 |
* |
||
| 9 |
* These functions can be used to verify that a message was signed by the holder |
||
| 10 |
* of the private keys of a given address. |
||
| 11 |
*/ |
||
| 12 |
library ECDSA {
|
||
| 13 |
enum RecoverError {
|
||
| 14 |
NoError, |
||
| 15 |
InvalidSignature, |
||
| 16 |
InvalidSignatureLength, |
||
| 17 |
InvalidSignatureS |
||
| 18 |
} |
||
| 19 | |||
| 20 |
/** |
||
| 21 |
* @dev The signature derives the `address(0)`. |
||
| 22 |
*/ |
||
| 23 |
error ECDSAInvalidSignature(); |
||
| 24 | |||
| 25 |
/** |
||
| 26 |
* @dev The signature has an invalid length. |
||
| 27 |
*/ |
||
| 28 |
error ECDSAInvalidSignatureLength(uint256 length); |
||
| 29 | |||
| 30 |
/** |
||
| 31 |
* @dev The signature has an S value that is in the upper half order. |
||
| 32 |
*/ |
||
| 33 |
error ECDSAInvalidSignatureS(bytes32 s); |
||
| 34 | |||
| 35 |
/** |
||
| 36 |
* @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not |
||
| 37 |
* return address(0) without also returning an error description. Errors are documented using an enum (error type) |
||
| 38 |
* and a bytes32 providing additional information about the error. |
||
| 39 |
* |
||
| 40 |
* If no error is returned, then the address can be used for verification purposes. |
||
| 41 |
* |
||
| 42 |
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: |
||
| 43 |
* this function rejects them by requiring the `s` value to be in the lower |
||
| 44 |
* half order, and the `v` value to be either 27 or 28. |
||
| 45 |
* |
||
| 46 |
* IMPORTANT: `hash` _must_ be the result of a hash operation for the |
||
| 47 |
* verification to be secure: it is possible to craft signatures that |
||
| 48 |
* recover to arbitrary addresses for non-hashed data. A safe way to ensure |
||
| 49 |
* this is by receiving a hash of the original message (which may otherwise |
||
| 50 |
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
|
||
| 51 |
* |
||
| 52 |
* Documentation for signature generation: |
||
| 53 |
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] |
||
| 54 |
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] |
||
| 55 |
*/ |
||
| 56 |
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
|
||
| 57 |
if (signature.length == 65) {
|
||
| 58 |
bytes32 r; |
||
| 59 |
bytes32 s; |
||
| 60 |
uint8 v; |
||
| 61 |
// ecrecover takes the signature parameters, and the only way to get them |
||
| 62 |
// currently is to use assembly. |
||
| 63 |
/// @solidity memory-safe-assembly |
||
| 64 |
assembly {
|
||
| 65 |
r := mload(add(signature, 0x20)) |
||
| 66 |
s := mload(add(signature, 0x40)) |
||
| 67 |
v := byte(0, mload(add(signature, 0x60))) |
||
| 68 |
} |
||
| 69 |
return tryRecover(hash, v, r, s); |
||
| 70 |
} else {
|
||
| 71 |
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); |
||
| 72 |
} |
||
| 73 |
} |
||
| 74 | |||
| 75 |
/** |
||
| 76 |
* @dev Returns the address that signed a hashed message (`hash`) with |
||
| 77 |
* `signature`. This address can then be used for verification purposes. |
||
| 78 |
* |
||
| 79 |
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: |
||
| 80 |
* this function rejects them by requiring the `s` value to be in the lower |
||
| 81 |
* half order, and the `v` value to be either 27 or 28. |
||
| 82 |
* |
||
| 83 |
* IMPORTANT: `hash` _must_ be the result of a hash operation for the |
||
| 84 |
* verification to be secure: it is possible to craft signatures that |
||
| 85 |
* recover to arbitrary addresses for non-hashed data. A safe way to ensure |
||
| 86 |
* this is by receiving a hash of the original message (which may otherwise |
||
| 87 |
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
|
||
| 88 |
*/ |
||
| 89 |
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
|
||
| 90 |
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); |
||
| 91 |
_throwError(error, errorArg); |
||
| 92 |
return recovered; |
||
| 93 |
} |
||
| 94 | |||
| 95 |
/** |
||
| 96 |
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
|
||
| 97 |
* |
||
| 98 |
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] |
||
| 99 |
*/ |
||
| 100 |
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
|
||
| 101 |
unchecked {
|
||
| 102 |
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); |
||
| 103 |
// We do not check for an overflow here since the shift operation results in 0 or 1. |
||
| 104 |
uint8 v = uint8((uint256(vs) >> 255) + 27); |
||
| 105 |
return tryRecover(hash, v, r, s); |
||
| 106 |
} |
||
| 107 |
} |
||
| 108 | |||
| 109 |
/** |
||
| 110 |
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
|
||
| 111 |
*/ |
||
| 112 |
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
|
||
| 113 |
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); |
||
| 114 |
_throwError(error, errorArg); |
||
| 115 |
return recovered; |
||
| 116 |
} |
||
| 117 | |||
| 118 |
/** |
||
| 119 |
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
|
||
| 120 |
* `r` and `s` signature fields separately. |
||
| 121 |
*/ |
||
| 122 |
function tryRecover( |
||
| 123 |
bytes32 hash, |
||
| 124 |
uint8 v, |
||
| 125 |
bytes32 r, |
||
| 126 |
bytes32 s |
||
| 127 |
⟳
|
) internal pure returns (address, RecoverError, bytes32) {
|
|
| 128 |
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature |
||
| 129 |
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines |
||
| 130 |
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
|
||
| 131 |
// signatures from current libraries generate a unique signature with an s-value in the lower half order. |
||
| 132 |
// |
||
| 133 |
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value |
||
| 134 |
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or |
||
| 135 |
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept |
||
| 136 |
// these malleable signatures as well. |
||
| 137 |
⟳
|
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
|
|
| 138 |
⟳
|
return (address(0), RecoverError.InvalidSignatureS, s); |
|
| 139 |
} |
||
| 140 | |||
| 141 |
// If the signature is valid (and not malleable), return the signer address |
||
| 142 |
⟳
|
address signer = ecrecover(hash, v, r, s); |
|
| 143 |
⟳
|
if (signer == address(0)) {
|
|
| 144 |
⟳
|
return (address(0), RecoverError.InvalidSignature, bytes32(0)); |
|
| 145 |
} |
||
| 146 | |||
| 147 |
⟳
|
return (signer, RecoverError.NoError, bytes32(0)); |
|
| 148 |
} |
||
| 149 | |||
| 150 |
/** |
||
| 151 |
* @dev Overload of {ECDSA-recover} that receives the `v`,
|
||
| 152 |
* `r` and `s` signature fields separately. |
||
| 153 |
*/ |
||
| 154 |
⟳
|
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
|
|
| 155 |
⟳
|
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); |
|
| 156 |
⟳
|
_throwError(error, errorArg); |
|
| 157 |
⟳
|
return recovered; |
|
| 158 |
} |
||
| 159 | |||
| 160 |
/** |
||
| 161 |
* @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. |
||
| 162 |
*/ |
||
| 163 |
function _throwError(RecoverError error, bytes32 errorArg) private pure {
|
||
| 164 |
⟳
|
if (error == RecoverError.NoError) {
|
|
| 165 |
return; // no error: do nothing |
||
| 166 |
⟳
|
} else if (error == RecoverError.InvalidSignature) {
|
|
| 167 |
⟳
|
revert ECDSAInvalidSignature(); |
|
| 168 |
⟳
|
} else if (error == RecoverError.InvalidSignatureLength) {
|
|
| 169 |
revert ECDSAInvalidSignatureLength(uint256(errorArg)); |
||
| 170 |
⟳
|
} else if (error == RecoverError.InvalidSignatureS) {
|
|
| 171 |
⟳
|
revert ECDSAInvalidSignatureS(errorArg); |
|
| 172 |
} |
||
| 173 |
} |
||
| 174 |
} |
||
| 175 |
| Lines covered: | 15 / 33 (45.5%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
import {MessageHashUtils} from "./MessageHashUtils.sol";
|
||
| 7 |
import {ShortStrings, ShortString} from "../ShortStrings.sol";
|
||
| 8 |
import {IERC5267} from "../../interfaces/IERC5267.sol";
|
||
| 9 | |||
| 10 |
/** |
||
| 11 |
* @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. |
||
| 12 |
* |
||
| 13 |
* The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose |
||
| 14 |
* encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract |
||
| 15 |
* does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to |
||
| 16 |
* produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. |
||
| 17 |
* |
||
| 18 |
* This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
|
||
| 19 |
* scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA |
||
| 20 |
* ({_hashTypedDataV4}).
|
||
| 21 |
* |
||
| 22 |
* The implementation of the domain separator was designed to be as efficient as possible while still properly updating |
||
| 23 |
* the chain id to protect against replay attacks on an eventual fork of the chain. |
||
| 24 |
* |
||
| 25 |
* NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method |
||
| 26 |
* https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. |
||
| 27 |
* |
||
| 28 |
* NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain |
||
| 29 |
* separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
|
||
| 30 |
* separator from the immutable values, which is cheaper than accessing a cached version in cold storage. |
||
| 31 |
* |
||
| 32 |
* @custom:oz-upgrades-unsafe-allow state-variable-immutable |
||
| 33 |
*/ |
||
| 34 |
abstract contract EIP712 is IERC5267 {
|
||
| 35 |
using ShortStrings for *; |
||
| 36 | |||
| 37 |
bytes32 private constant TYPE_HASH = |
||
| 38 |
√
|
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
|
|
| 39 | |||
| 40 |
// Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to |
||
| 41 |
// invalidate the cached domain separator if the chain id changes. |
||
| 42 |
bytes32 private immutable _cachedDomainSeparator; |
||
| 43 |
uint256 private immutable _cachedChainId; |
||
| 44 |
address private immutable _cachedThis; |
||
| 45 | |||
| 46 |
bytes32 private immutable _hashedName; |
||
| 47 |
bytes32 private immutable _hashedVersion; |
||
| 48 | |||
| 49 |
ShortString private immutable _name; |
||
| 50 |
ShortString private immutable _version; |
||
| 51 |
string private _nameFallback; |
||
| 52 |
string private _versionFallback; |
||
| 53 | |||
| 54 |
/** |
||
| 55 |
* @dev Initializes the domain separator and parameter caches. |
||
| 56 |
* |
||
| 57 |
* The meaning of `name` and `version` is specified in |
||
| 58 |
* https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: |
||
| 59 |
* |
||
| 60 |
* - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. |
||
| 61 |
* - `version`: the current major version of the signing domain. |
||
| 62 |
* |
||
| 63 |
* NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart |
||
| 64 |
* contract upgrade]. |
||
| 65 |
*/ |
||
| 66 |
constructor(string memory name, string memory version) {
|
||
| 67 |
√
|
_name = name.toShortStringWithFallback(_nameFallback); |
|
| 68 |
√
|
_version = version.toShortStringWithFallback(_versionFallback); |
|
| 69 |
√
|
_hashedName = keccak256(bytes(name)); |
|
| 70 |
√
|
_hashedVersion = keccak256(bytes(version)); |
|
| 71 | |||
| 72 |
√
|
_cachedChainId = block.chainid; |
|
| 73 |
√
|
_cachedDomainSeparator = _buildDomainSeparator(); |
|
| 74 |
√
|
_cachedThis = address(this); |
|
| 75 |
} |
||
| 76 | |||
| 77 |
/** |
||
| 78 |
* @dev Returns the domain separator for the current chain. |
||
| 79 |
*/ |
||
| 80 |
⟳
|
function _domainSeparatorV4() internal view returns (bytes32) {
|
|
| 81 |
⟳
|
if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
|
|
| 82 |
⟳
|
return _cachedDomainSeparator; |
|
| 83 |
} else {
|
||
| 84 |
return _buildDomainSeparator(); |
||
| 85 |
} |
||
| 86 |
} |
||
| 87 | |||
| 88 |
√
|
function _buildDomainSeparator() private view returns (bytes32) {
|
|
| 89 |
√
|
return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); |
|
| 90 |
} |
||
| 91 | |||
| 92 |
/** |
||
| 93 |
* @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this |
||
| 94 |
* function returns the hash of the fully encoded EIP712 message for this domain. |
||
| 95 |
* |
||
| 96 |
* This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
|
||
| 97 |
* |
||
| 98 |
* ```solidity |
||
| 99 |
* bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( |
||
| 100 |
* keccak256("Mail(address to,string contents)"),
|
||
| 101 |
* mailTo, |
||
| 102 |
* keccak256(bytes(mailContents)) |
||
| 103 |
* ))); |
||
| 104 |
* address signer = ECDSA.recover(digest, signature); |
||
| 105 |
* ``` |
||
| 106 |
*/ |
||
| 107 |
⟳
|
function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
|
|
| 108 |
⟳
|
return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); |
|
| 109 |
} |
||
| 110 | |||
| 111 |
/** |
||
| 112 |
* @dev See {IERC-5267}.
|
||
| 113 |
*/ |
||
| 114 |
function eip712Domain() |
||
| 115 |
public |
||
| 116 |
view |
||
| 117 |
virtual |
||
| 118 |
returns ( |
||
| 119 |
bytes1 fields, |
||
| 120 |
string memory name, |
||
| 121 |
string memory version, |
||
| 122 |
uint256 chainId, |
||
| 123 |
address verifyingContract, |
||
| 124 |
bytes32 salt, |
||
| 125 |
uint256[] memory extensions |
||
| 126 |
) |
||
| 127 |
{
|
||
| 128 |
return ( |
||
| 129 |
hex"0f", // 01111 |
||
| 130 |
_EIP712Name(), |
||
| 131 |
_EIP712Version(), |
||
| 132 |
block.chainid, |
||
| 133 |
address(this), |
||
| 134 |
bytes32(0), |
||
| 135 |
new uint256[](0) |
||
| 136 |
); |
||
| 137 |
} |
||
| 138 | |||
| 139 |
/** |
||
| 140 |
* @dev The name parameter for the EIP712 domain. |
||
| 141 |
* |
||
| 142 |
* NOTE: By default this function reads _name which is an immutable value. |
||
| 143 |
* It only reads from storage if necessary (in case the value is too large to fit in a ShortString). |
||
| 144 |
*/ |
||
| 145 |
// solhint-disable-next-line func-name-mixedcase |
||
| 146 |
function _EIP712Name() internal view returns (string memory) {
|
||
| 147 |
return _name.toStringWithFallback(_nameFallback); |
||
| 148 |
} |
||
| 149 | |||
| 150 |
/** |
||
| 151 |
* @dev The version parameter for the EIP712 domain. |
||
| 152 |
* |
||
| 153 |
* NOTE: By default this function reads _version which is an immutable value. |
||
| 154 |
* It only reads from storage if necessary (in case the value is too large to fit in a ShortString). |
||
| 155 |
*/ |
||
| 156 |
// solhint-disable-next-line func-name-mixedcase |
||
| 157 |
function _EIP712Version() internal view returns (string memory) {
|
||
| 158 |
return _version.toStringWithFallback(_versionFallback); |
||
| 159 |
} |
||
| 160 |
} |
||
| 161 |
| Lines covered: | 5 / 6 (83.3%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
import {Strings} from "../Strings.sol";
|
||
| 7 | |||
| 8 |
/** |
||
| 9 |
* @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
|
||
| 10 |
* |
||
| 11 |
* The library provides methods for generating a hash of a message that conforms to the |
||
| 12 |
* https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] |
||
| 13 |
* specifications. |
||
| 14 |
*/ |
||
| 15 |
library MessageHashUtils {
|
||
| 16 |
/** |
||
| 17 |
* @dev Returns the keccak256 digest of an EIP-191 signed data with version |
||
| 18 |
* `0x45` (`personal_sign` messages). |
||
| 19 |
* |
||
| 20 |
* The digest is calculated by prefixing a bytes32 `messageHash` with |
||
| 21 |
* `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the |
||
| 22 |
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. |
||
| 23 |
* |
||
| 24 |
* NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with |
||
| 25 |
* keccak256, although any bytes32 value can be safely used because the final digest will |
||
| 26 |
* be re-hashed. |
||
| 27 |
* |
||
| 28 |
* See {ECDSA-recover}.
|
||
| 29 |
*/ |
||
| 30 |
function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
|
||
| 31 |
/// @solidity memory-safe-assembly |
||
| 32 |
assembly {
|
||
| 33 |
mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash |
||
| 34 |
mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix |
||
| 35 |
digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) |
||
| 36 |
} |
||
| 37 |
} |
||
| 38 | |||
| 39 |
/** |
||
| 40 |
* @dev Returns the keccak256 digest of an EIP-191 signed data with version |
||
| 41 |
* `0x45` (`personal_sign` messages). |
||
| 42 |
* |
||
| 43 |
* The digest is calculated by prefixing an arbitrary `message` with |
||
| 44 |
* `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the |
||
| 45 |
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. |
||
| 46 |
* |
||
| 47 |
* See {ECDSA-recover}.
|
||
| 48 |
*/ |
||
| 49 |
function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
|
||
| 50 |
return |
||
| 51 |
keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
|
||
| 52 |
} |
||
| 53 | |||
| 54 |
/** |
||
| 55 |
* @dev Returns the keccak256 digest of an EIP-191 signed data with version |
||
| 56 |
* `0x00` (data with intended validator). |
||
| 57 |
* |
||
| 58 |
* The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended |
||
| 59 |
* `validator` address. Then hashing the result. |
||
| 60 |
* |
||
| 61 |
* See {ECDSA-recover}.
|
||
| 62 |
*/ |
||
| 63 |
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
|
||
| 64 |
return keccak256(abi.encodePacked(hex"19_00", validator, data)); |
||
| 65 |
} |
||
| 66 | |||
| 67 |
/** |
||
| 68 |
* @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). |
||
| 69 |
* |
||
| 70 |
* The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with |
||
| 71 |
* `\x19\x01` and hashing the result. It corresponds to the hash signed by the |
||
| 72 |
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. |
||
| 73 |
* |
||
| 74 |
* See {ECDSA-recover}.
|
||
| 75 |
*/ |
||
| 76 |
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {
|
||
| 77 |
/// @solidity memory-safe-assembly |
||
| 78 |
assembly {
|
||
| 79 |
⟳
|
let ptr := mload(0x40) |
|
| 80 |
⟳
|
mstore(ptr, hex"19_01") |
|
| 81 |
⟳
|
mstore(add(ptr, 0x02), domainSeparator) |
|
| 82 |
⟳
|
mstore(add(ptr, 0x22), structHash) |
|
| 83 |
⟳
|
digest := keccak256(ptr, 0x42) |
|
| 84 |
} |
||
| 85 |
} |
||
| 86 |
} |
||
| 87 |
| Lines covered: | 30 / 40 (75.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
/** |
||
| 7 |
* @dev Standard math utilities missing in the Solidity language. |
||
| 8 |
*/ |
||
| 9 |
library Math {
|
||
| 10 |
/** |
||
| 11 |
* @dev Muldiv operation overflow. |
||
| 12 |
*/ |
||
| 13 |
error MathOverflowedMulDiv(); |
||
| 14 | |||
| 15 |
enum Rounding {
|
||
| 16 |
Floor, // Toward negative infinity |
||
| 17 |
Ceil, // Toward positive infinity |
||
| 18 |
Trunc, // Toward zero |
||
| 19 |
Expand // Away from zero |
||
| 20 |
} |
||
| 21 | |||
| 22 |
/** |
||
| 23 |
* @dev Returns the addition of two unsigned integers, with an overflow flag. |
||
| 24 |
*/ |
||
| 25 |
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
|
||
| 26 |
unchecked {
|
||
| 27 |
uint256 c = a + b; |
||
| 28 |
if (c < a) return (false, 0); |
||
| 29 |
return (true, c); |
||
| 30 |
} |
||
| 31 |
} |
||
| 32 | |||
| 33 |
/** |
||
| 34 |
* @dev Returns the subtraction of two unsigned integers, with an overflow flag. |
||
| 35 |
*/ |
||
| 36 |
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
|
||
| 37 |
unchecked {
|
||
| 38 |
if (b > a) return (false, 0); |
||
| 39 |
return (true, a - b); |
||
| 40 |
} |
||
| 41 |
} |
||
| 42 | |||
| 43 |
/** |
||
| 44 |
* @dev Returns the multiplication of two unsigned integers, with an overflow flag. |
||
| 45 |
*/ |
||
| 46 |
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
|
||
| 47 |
unchecked {
|
||
| 48 |
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the |
||
| 49 |
// benefit is lost if 'b' is also tested. |
||
| 50 |
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 |
||
| 51 |
if (a == 0) return (true, 0); |
||
| 52 |
uint256 c = a * b; |
||
| 53 |
if (c / a != b) return (false, 0); |
||
| 54 |
return (true, c); |
||
| 55 |
} |
||
| 56 |
} |
||
| 57 | |||
| 58 |
/** |
||
| 59 |
* @dev Returns the division of two unsigned integers, with a division by zero flag. |
||
| 60 |
*/ |
||
| 61 |
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
|
||
| 62 |
unchecked {
|
||
| 63 |
if (b == 0) return (false, 0); |
||
| 64 |
return (true, a / b); |
||
| 65 |
} |
||
| 66 |
} |
||
| 67 | |||
| 68 |
/** |
||
| 69 |
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. |
||
| 70 |
*/ |
||
| 71 |
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
|
||
| 72 |
unchecked {
|
||
| 73 |
if (b == 0) return (false, 0); |
||
| 74 |
return (true, a % b); |
||
| 75 |
} |
||
| 76 |
} |
||
| 77 | |||
| 78 |
/** |
||
| 79 |
* @dev Returns the largest of two numbers. |
||
| 80 |
*/ |
||
| 81 |
function max(uint256 a, uint256 b) internal pure returns (uint256) {
|
||
| 82 |
return a > b ? a : b; |
||
| 83 |
} |
||
| 84 | |||
| 85 |
/** |
||
| 86 |
* @dev Returns the smallest of two numbers. |
||
| 87 |
*/ |
||
| 88 |
√
|
⟳
|
function min(uint256 a, uint256 b) internal pure returns (uint256) {
|
| 89 |
√
|
⟳
|
return a < b ? a : b; |
| 90 |
} |
||
| 91 | |||
| 92 |
/** |
||
| 93 |
* @dev Returns the average of two numbers. The result is rounded towards |
||
| 94 |
* zero. |
||
| 95 |
*/ |
||
| 96 |
function average(uint256 a, uint256 b) internal pure returns (uint256) {
|
||
| 97 |
// (a + b) / 2 can overflow. |
||
| 98 |
return (a & b) + (a ^ b) / 2; |
||
| 99 |
} |
||
| 100 | |||
| 101 |
/** |
||
| 102 |
* @dev Returns the ceiling of the division of two numbers. |
||
| 103 |
* |
||
| 104 |
* This differs from standard division with `/` in that it rounds towards infinity instead |
||
| 105 |
* of rounding towards zero. |
||
| 106 |
*/ |
||
| 107 |
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
|
||
| 108 |
if (b == 0) {
|
||
| 109 |
// Guarantee the same behavior as in a regular Solidity division. |
||
| 110 |
return a / b; |
||
| 111 |
} |
||
| 112 | |||
| 113 |
// (a + b - 1) / b can overflow on addition, so we distribute. |
||
| 114 |
return a == 0 ? 0 : (a - 1) / b + 1; |
||
| 115 |
} |
||
| 116 | |||
| 117 |
/** |
||
| 118 |
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or |
||
| 119 |
* denominator == 0. |
||
| 120 |
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by |
||
| 121 |
* Uniswap Labs also under MIT license. |
||
| 122 |
*/ |
||
| 123 |
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
|
||
| 124 |
unchecked {
|
||
| 125 |
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use |
||
| 126 |
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 |
||
| 127 |
// variables such that product = prod1 * 2^256 + prod0. |
||
| 128 |
uint256 prod0 = x * y; // Least significant 256 bits of the product |
||
| 129 |
uint256 prod1; // Most significant 256 bits of the product |
||
| 130 |
assembly {
|
||
| 131 |
let mm := mulmod(x, y, not(0)) |
||
| 132 |
prod1 := sub(sub(mm, prod0), lt(mm, prod0)) |
||
| 133 |
} |
||
| 134 | |||
| 135 |
// Handle non-overflow cases, 256 by 256 division. |
||
| 136 |
if (prod1 == 0) {
|
||
| 137 |
// Solidity will revert if denominator == 0, unlike the div opcode on its own. |
||
| 138 |
// The surrounding unchecked block does not change this fact. |
||
| 139 |
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. |
||
| 140 |
return prod0 / denominator; |
||
| 141 |
} |
||
| 142 | |||
| 143 |
// Make sure the result is less than 2^256. Also prevents denominator == 0. |
||
| 144 |
if (denominator <= prod1) {
|
||
| 145 |
revert MathOverflowedMulDiv(); |
||
| 146 |
} |
||
| 147 | |||
| 148 |
/////////////////////////////////////////////// |
||
| 149 |
// 512 by 256 division. |
||
| 150 |
/////////////////////////////////////////////// |
||
| 151 | |||
| 152 |
// Make division exact by subtracting the remainder from [prod1 prod0]. |
||
| 153 |
uint256 remainder; |
||
| 154 |
assembly {
|
||
| 155 |
// Compute remainder using mulmod. |
||
| 156 |
remainder := mulmod(x, y, denominator) |
||
| 157 | |||
| 158 |
// Subtract 256 bit number from 512 bit number. |
||
| 159 |
prod1 := sub(prod1, gt(remainder, prod0)) |
||
| 160 |
prod0 := sub(prod0, remainder) |
||
| 161 |
} |
||
| 162 | |||
| 163 |
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. |
||
| 164 |
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363. |
||
| 165 | |||
| 166 |
uint256 twos = denominator & (0 - denominator); |
||
| 167 |
assembly {
|
||
| 168 |
// Divide denominator by twos. |
||
| 169 |
denominator := div(denominator, twos) |
||
| 170 | |||
| 171 |
// Divide [prod1 prod0] by twos. |
||
| 172 |
prod0 := div(prod0, twos) |
||
| 173 | |||
| 174 |
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. |
||
| 175 |
twos := add(div(sub(0, twos), twos), 1) |
||
| 176 |
} |
||
| 177 | |||
| 178 |
// Shift in bits from prod1 into prod0. |
||
| 179 |
prod0 |= prod1 * twos; |
||
| 180 | |||
| 181 |
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such |
||
| 182 |
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for |
||
| 183 |
// four bits. That is, denominator * inv = 1 mod 2^4. |
||
| 184 |
uint256 inverse = (3 * denominator) ^ 2; |
||
| 185 | |||
| 186 |
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also |
||
| 187 |
// works in modular arithmetic, doubling the correct bits in each step. |
||
| 188 |
inverse *= 2 - denominator * inverse; // inverse mod 2^8 |
||
| 189 |
inverse *= 2 - denominator * inverse; // inverse mod 2^16 |
||
| 190 |
inverse *= 2 - denominator * inverse; // inverse mod 2^32 |
||
| 191 |
inverse *= 2 - denominator * inverse; // inverse mod 2^64 |
||
| 192 |
inverse *= 2 - denominator * inverse; // inverse mod 2^128 |
||
| 193 |
inverse *= 2 - denominator * inverse; // inverse mod 2^256 |
||
| 194 | |||
| 195 |
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator. |
||
| 196 |
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is |
||
| 197 |
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 |
||
| 198 |
// is no longer required. |
||
| 199 |
result = prod0 * inverse; |
||
| 200 |
return result; |
||
| 201 |
} |
||
| 202 |
} |
||
| 203 | |||
| 204 |
/** |
||
| 205 |
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction. |
||
| 206 |
*/ |
||
| 207 |
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
|
||
| 208 |
uint256 result = mulDiv(x, y, denominator); |
||
| 209 |
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
|
||
| 210 |
result += 1; |
||
| 211 |
} |
||
| 212 |
return result; |
||
| 213 |
} |
||
| 214 | |||
| 215 |
/** |
||
| 216 |
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded |
||
| 217 |
* towards zero. |
||
| 218 |
* |
||
| 219 |
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). |
||
| 220 |
*/ |
||
| 221 |
√
|
function sqrt(uint256 a) internal pure returns (uint256) {
|
|
| 222 |
√
|
if (a == 0) {
|
|
| 223 |
return 0; |
||
| 224 |
} |
||
| 225 | |||
| 226 |
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. |
||
| 227 |
// |
||
| 228 |
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have |
||
| 229 |
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. |
||
| 230 |
// |
||
| 231 |
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` |
||
| 232 |
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` |
||
| 233 |
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` |
||
| 234 |
// |
||
| 235 |
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. |
||
| 236 |
√
|
uint256 result = 1 << (log2(a) >> 1); |
|
| 237 | |||
| 238 |
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, |
||
| 239 |
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at |
||
| 240 |
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision |
||
| 241 |
// into the expected uint128 result. |
||
| 242 |
unchecked {
|
||
| 243 |
√
|
result = (result + a / result) >> 1; |
|
| 244 |
√
|
result = (result + a / result) >> 1; |
|
| 245 |
√
|
result = (result + a / result) >> 1; |
|
| 246 |
√
|
result = (result + a / result) >> 1; |
|
| 247 |
√
|
result = (result + a / result) >> 1; |
|
| 248 |
√
|
result = (result + a / result) >> 1; |
|
| 249 |
√
|
result = (result + a / result) >> 1; |
|
| 250 |
√
|
return min(result, a / result); |
|
| 251 |
} |
||
| 252 |
} |
||
| 253 | |||
| 254 |
/** |
||
| 255 |
* @notice Calculates sqrt(a), following the selected rounding direction. |
||
| 256 |
*/ |
||
| 257 |
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
|
||
| 258 |
unchecked {
|
||
| 259 |
uint256 result = sqrt(a); |
||
| 260 |
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); |
||
| 261 |
} |
||
| 262 |
} |
||
| 263 | |||
| 264 |
/** |
||
| 265 |
* @dev Return the log in base 2 of a positive value rounded towards zero. |
||
| 266 |
* Returns 0 if given 0. |
||
| 267 |
*/ |
||
| 268 |
√
|
function log2(uint256 value) internal pure returns (uint256) {
|
|
| 269 |
uint256 result = 0; |
||
| 270 |
unchecked {
|
||
| 271 |
√
|
if (value >> 128 > 0) {
|
|
| 272 |
√
|
value >>= 128; |
|
| 273 |
√
|
result += 128; |
|
| 274 |
} |
||
| 275 |
√
|
if (value >> 64 > 0) {
|
|
| 276 |
value >>= 64; |
||
| 277 |
result += 64; |
||
| 278 |
} |
||
| 279 |
√
|
if (value >> 32 > 0) {
|
|
| 280 |
value >>= 32; |
||
| 281 |
result += 32; |
||
| 282 |
} |
||
| 283 |
√
|
if (value >> 16 > 0) {
|
|
| 284 |
value >>= 16; |
||
| 285 |
result += 16; |
||
| 286 |
} |
||
| 287 |
√
|
if (value >> 8 > 0) {
|
|
| 288 |
√
|
value >>= 8; |
|
| 289 |
√
|
result += 8; |
|
| 290 |
} |
||
| 291 |
√
|
if (value >> 4 > 0) {
|
|
| 292 |
value >>= 4; |
||
| 293 |
result += 4; |
||
| 294 |
} |
||
| 295 |
√
|
if (value >> 2 > 0) {
|
|
| 296 |
√
|
value >>= 2; |
|
| 297 |
√
|
result += 2; |
|
| 298 |
} |
||
| 299 |
√
|
if (value >> 1 > 0) {
|
|
| 300 |
√
|
result += 1; |
|
| 301 |
} |
||
| 302 |
} |
||
| 303 |
√
|
return result; |
|
| 304 |
} |
||
| 305 | |||
| 306 |
/** |
||
| 307 |
* @dev Return the log in base 2, following the selected rounding direction, of a positive value. |
||
| 308 |
* Returns 0 if given 0. |
||
| 309 |
*/ |
||
| 310 |
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
|
||
| 311 |
unchecked {
|
||
| 312 |
uint256 result = log2(value); |
||
| 313 |
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); |
||
| 314 |
} |
||
| 315 |
} |
||
| 316 | |||
| 317 |
/** |
||
| 318 |
* @dev Return the log in base 10 of a positive value rounded towards zero. |
||
| 319 |
* Returns 0 if given 0. |
||
| 320 |
*/ |
||
| 321 |
function log10(uint256 value) internal pure returns (uint256) {
|
||
| 322 |
uint256 result = 0; |
||
| 323 |
unchecked {
|
||
| 324 |
if (value >= 10 ** 64) {
|
||
| 325 |
value /= 10 ** 64; |
||
| 326 |
result += 64; |
||
| 327 |
} |
||
| 328 |
if (value >= 10 ** 32) {
|
||
| 329 |
value /= 10 ** 32; |
||
| 330 |
result += 32; |
||
| 331 |
} |
||
| 332 |
if (value >= 10 ** 16) {
|
||
| 333 |
value /= 10 ** 16; |
||
| 334 |
result += 16; |
||
| 335 |
} |
||
| 336 |
if (value >= 10 ** 8) {
|
||
| 337 |
value /= 10 ** 8; |
||
| 338 |
result += 8; |
||
| 339 |
} |
||
| 340 |
if (value >= 10 ** 4) {
|
||
| 341 |
value /= 10 ** 4; |
||
| 342 |
result += 4; |
||
| 343 |
} |
||
| 344 |
if (value >= 10 ** 2) {
|
||
| 345 |
value /= 10 ** 2; |
||
| 346 |
result += 2; |
||
| 347 |
} |
||
| 348 |
if (value >= 10 ** 1) {
|
||
| 349 |
result += 1; |
||
| 350 |
} |
||
| 351 |
} |
||
| 352 |
return result; |
||
| 353 |
} |
||
| 354 | |||
| 355 |
/** |
||
| 356 |
* @dev Return the log in base 10, following the selected rounding direction, of a positive value. |
||
| 357 |
* Returns 0 if given 0. |
||
| 358 |
*/ |
||
| 359 |
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
|
||
| 360 |
unchecked {
|
||
| 361 |
uint256 result = log10(value); |
||
| 362 |
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); |
||
| 363 |
} |
||
| 364 |
} |
||
| 365 | |||
| 366 |
/** |
||
| 367 |
* @dev Return the log in base 256 of a positive value rounded towards zero. |
||
| 368 |
* Returns 0 if given 0. |
||
| 369 |
* |
||
| 370 |
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. |
||
| 371 |
*/ |
||
| 372 |
function log256(uint256 value) internal pure returns (uint256) {
|
||
| 373 |
uint256 result = 0; |
||
| 374 |
unchecked {
|
||
| 375 |
if (value >> 128 > 0) {
|
||
| 376 |
value >>= 128; |
||
| 377 |
result += 16; |
||
| 378 |
} |
||
| 379 |
if (value >> 64 > 0) {
|
||
| 380 |
value >>= 64; |
||
| 381 |
result += 8; |
||
| 382 |
} |
||
| 383 |
if (value >> 32 > 0) {
|
||
| 384 |
value >>= 32; |
||
| 385 |
result += 4; |
||
| 386 |
} |
||
| 387 |
if (value >> 16 > 0) {
|
||
| 388 |
value >>= 16; |
||
| 389 |
result += 2; |
||
| 390 |
} |
||
| 391 |
if (value >> 8 > 0) {
|
||
| 392 |
result += 1; |
||
| 393 |
} |
||
| 394 |
} |
||
| 395 |
return result; |
||
| 396 |
} |
||
| 397 | |||
| 398 |
/** |
||
| 399 |
* @dev Return the log in base 256, following the selected rounding direction, of a positive value. |
||
| 400 |
* Returns 0 if given 0. |
||
| 401 |
*/ |
||
| 402 |
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
|
||
| 403 |
unchecked {
|
||
| 404 |
uint256 result = log256(value); |
||
| 405 |
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); |
||
| 406 |
} |
||
| 407 |
} |
||
| 408 | |||
| 409 |
/** |
||
| 410 |
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. |
||
| 411 |
*/ |
||
| 412 |
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
|
||
| 413 |
return uint8(rounding) % 2 == 1; |
||
| 414 |
} |
||
| 415 |
} |
||
| 416 |
| Lines covered: | 0 / 1 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: MIT |
||
| 2 |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) |
||
| 3 | |||
| 4 |
pragma solidity ^0.8.20; |
||
| 5 | |||
| 6 |
/** |
||
| 7 |
* @dev Standard signed math utilities missing in the Solidity language. |
||
| 8 |
*/ |
||
| 9 |
library SignedMath {
|
||
| 10 |
/** |
||
| 11 |
* @dev Returns the largest of two signed numbers. |
||
| 12 |
*/ |
||
| 13 |
function max(int256 a, int256 b) internal pure returns (int256) {
|
||
| 14 |
return a > b ? a : b; |
||
| 15 |
} |
||
| 16 | |||
| 17 |
/** |
||
| 18 |
* @dev Returns the smallest of two signed numbers. |
||
| 19 |
*/ |
||
| 20 |
function min(int256 a, int256 b) internal pure returns (int256) {
|
||
| 21 |
return a < b ? a : b; |
||
| 22 |
} |
||
| 23 | |||
| 24 |
/** |
||
| 25 |
* @dev Returns the average of two signed numbers without overflow. |
||
| 26 |
* The result is rounded towards zero. |
||
| 27 |
*/ |
||
| 28 |
function average(int256 a, int256 b) internal pure returns (int256) {
|
||
| 29 |
// Formula from the book "Hacker's Delight" |
||
| 30 |
int256 x = (a & b) + ((a ^ b) >> 1); |
||
| 31 |
return x + (int256(uint256(x) >> 255) & (a ^ b)); |
||
| 32 |
} |
||
| 33 | |||
| 34 |
/** |
||
| 35 |
* @dev Returns the absolute unsigned value of a signed value. |
||
| 36 |
*/ |
||
| 37 |
function abs(int256 n) internal pure returns (uint256) {
|
||
| 38 |
unchecked {
|
||
| 39 |
// must be unchecked in order to support `n = type(int256).min` |
||
| 40 |
return uint256(n >= 0 ? n : -n); |
||
| 41 |
} |
||
| 42 |
} |
||
| 43 |
} |
||
| 44 |
| Lines covered: | 0 / 3 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: UNLICENSED |
||
| 2 |
pragma solidity ^0.8.13; |
||
| 3 | |||
| 4 |
import {Script, console} from "forge-std/Script.sol";
|
||
| 5 | |||
| 6 |
contract CounterScript is Script {
|
||
| 7 |
function setUp() public {}
|
||
| 8 | |||
| 9 |
function run() public {
|
||
| 10 |
vm.broadcast(); |
||
| 11 |
} |
||
| 12 |
} |
||
| 13 |
| Lines covered: | 21 / 24 (87.5%) |
|---|
| 1 |
// SPDX-License-Identifier: AGPL-3.0-only |
||
| 2 |
pragma solidity >=0.8.0; |
||
| 3 | |||
| 4 |
/// @notice Arithmetic library with operations for fixed-point numbers. |
||
| 5 |
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol) |
||
| 6 |
/// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol) |
||
| 7 |
library FixedPointMathLib {
|
||
| 8 |
/*////////////////////////////////////////////////////////////// |
||
| 9 |
SIMPLIFIED FIXED POINT OPERATIONS |
||
| 10 |
//////////////////////////////////////////////////////////////*/ |
||
| 11 | |||
| 12 |
uint256 internal constant MAX_UINT256 = 2 ** 256 - 1; |
||
| 13 | |||
| 14 |
uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s. |
||
| 15 | |||
| 16 |
function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {
|
||
| 17 |
return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down. |
||
| 18 |
} |
||
| 19 | |||
| 20 |
function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {
|
||
| 21 |
return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up. |
||
| 22 |
} |
||
| 23 | |||
| 24 |
function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {
|
||
| 25 |
return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down. |
||
| 26 |
} |
||
| 27 | |||
| 28 |
function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {
|
||
| 29 |
return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up. |
||
| 30 |
} |
||
| 31 | |||
| 32 |
/*////////////////////////////////////////////////////////////// |
||
| 33 |
LOW LEVEL FIXED POINT OPERATIONS |
||
| 34 |
//////////////////////////////////////////////////////////////*/ |
||
| 35 | |||
| 36 |
function mulDivDown(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 z) {
|
||
| 37 |
/// @solidity memory-safe-assembly |
||
| 38 |
assembly {
|
||
| 39 |
// Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y)) |
||
| 40 |
if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) { revert(0, 0) }
|
||
| 41 | |||
| 42 |
// Divide x * y by the denominator. |
||
| 43 |
z := div(mul(x, y), denominator) |
||
| 44 |
} |
||
| 45 |
} |
||
| 46 | |||
| 47 |
function mulDivUp(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 z) {
|
||
| 48 |
/// @solidity memory-safe-assembly |
||
| 49 |
assembly {
|
||
| 50 |
// Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y)) |
||
| 51 |
if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) { revert(0, 0) }
|
||
| 52 | |||
| 53 |
// If x * y modulo the denominator is strictly greater than 0, |
||
| 54 |
// 1 is added to round up the division of x * y by the denominator. |
||
| 55 |
z := add(gt(mod(mul(x, y), denominator), 0), div(mul(x, y), denominator)) |
||
| 56 |
} |
||
| 57 |
} |
||
| 58 | |||
| 59 |
function rpow(uint256 x, uint256 n, uint256 scalar) internal pure returns (uint256 z) {
|
||
| 60 |
/// @solidity memory-safe-assembly |
||
| 61 |
assembly {
|
||
| 62 |
switch x |
||
| 63 |
case 0 {
|
||
| 64 |
switch n |
||
| 65 |
case 0 {
|
||
| 66 |
// 0 ** 0 = 1 |
||
| 67 |
z := scalar |
||
| 68 |
} |
||
| 69 |
default {
|
||
| 70 |
// 0 ** n = 0 |
||
| 71 |
z := 0 |
||
| 72 |
} |
||
| 73 |
} |
||
| 74 |
default {
|
||
| 75 |
switch mod(n, 2) |
||
| 76 |
case 0 {
|
||
| 77 |
// If n is even, store scalar in z for now. |
||
| 78 |
z := scalar |
||
| 79 |
} |
||
| 80 |
default {
|
||
| 81 |
// If n is odd, store x in z for now. |
||
| 82 |
z := x |
||
| 83 |
} |
||
| 84 | |||
| 85 |
// Shifting right by 1 is like dividing by 2. |
||
| 86 |
let half := shr(1, scalar) |
||
| 87 | |||
| 88 |
for {
|
||
| 89 |
// Shift n right by 1 before looping to halve it. |
||
| 90 |
n := shr(1, n) |
||
| 91 |
} n {
|
||
| 92 |
// Shift n right by 1 each iteration to halve it. |
||
| 93 |
n := shr(1, n) |
||
| 94 |
} {
|
||
| 95 |
// Revert immediately if x ** 2 would overflow. |
||
| 96 |
// Equivalent to iszero(eq(div(xx, x), x)) here. |
||
| 97 |
if shr(128, x) { revert(0, 0) }
|
||
| 98 | |||
| 99 |
// Store x squared. |
||
| 100 |
let xx := mul(x, x) |
||
| 101 | |||
| 102 |
// Round to the nearest number. |
||
| 103 |
let xxRound := add(xx, half) |
||
| 104 | |||
| 105 |
// Revert if xx + half overflowed. |
||
| 106 |
if lt(xxRound, xx) { revert(0, 0) }
|
||
| 107 | |||
| 108 |
// Set x to scaled xxRound. |
||
| 109 |
x := div(xxRound, scalar) |
||
| 110 | |||
| 111 |
// If n is even: |
||
| 112 |
if mod(n, 2) {
|
||
| 113 |
// Compute z * x. |
||
| 114 |
let zx := mul(z, x) |
||
| 115 | |||
| 116 |
// If z * x overflowed: |
||
| 117 |
if iszero(eq(div(zx, x), z)) {
|
||
| 118 |
// Revert if x is non-zero. |
||
| 119 |
if iszero(iszero(x)) { revert(0, 0) }
|
||
| 120 |
} |
||
| 121 | |||
| 122 |
// Round to the nearest number. |
||
| 123 |
let zxRound := add(zx, half) |
||
| 124 | |||
| 125 |
// Revert if zx + half overflowed. |
||
| 126 |
if lt(zxRound, zx) { revert(0, 0) }
|
||
| 127 | |||
| 128 |
// Return properly scaled zxRound. |
||
| 129 |
z := div(zxRound, scalar) |
||
| 130 |
} |
||
| 131 |
} |
||
| 132 |
} |
||
| 133 |
} |
||
| 134 |
} |
||
| 135 | |||
| 136 |
/*////////////////////////////////////////////////////////////// |
||
| 137 |
GENERAL NUMBER UTILITIES |
||
| 138 |
//////////////////////////////////////////////////////////////*/ |
||
| 139 | |||
| 140 |
function sqrt(uint256 x) internal pure returns (uint256 z) {
|
||
| 141 |
/// @solidity memory-safe-assembly |
||
| 142 |
assembly {
|
||
| 143 |
√
|
let y := x // We start y at x, which will help us make our initial estimate. |
|
| 144 | |||
| 145 |
√
|
z := 181 // The "correct" value is 1, but this saves a multiplication later. |
|
| 146 | |||
| 147 |
// This segment is to get a reasonable initial estimate for the Babylonian method. With a bad |
||
| 148 |
// start, the correct # of bits increases ~linearly each iteration instead of ~quadratically. |
||
| 149 | |||
| 150 |
// We check y >= 2^(k + 8) but shift right by k bits |
||
| 151 |
// each branch to ensure that if x >= 256, then y >= 256. |
||
| 152 |
√
|
if iszero(lt(y, 0x10000000000000000000000000000000000)) {
|
|
| 153 |
√
|
y := shr(128, y) |
|
| 154 |
√
|
z := shl(64, z) |
|
| 155 |
} |
||
| 156 |
√
|
if iszero(lt(y, 0x1000000000000000000)) {
|
|
| 157 |
√
|
y := shr(64, y) |
|
| 158 |
√
|
z := shl(32, z) |
|
| 159 |
} |
||
| 160 |
√
|
if iszero(lt(y, 0x10000000000)) {
|
|
| 161 |
√
|
y := shr(32, y) |
|
| 162 |
√
|
z := shl(16, z) |
|
| 163 |
} |
||
| 164 |
√
|
if iszero(lt(y, 0x1000000)) {
|
|
| 165 |
y := shr(16, y) |
||
| 166 |
z := shl(8, z) |
||
| 167 |
} |
||
| 168 | |||
| 169 |
// Goal was to get z*z*y within a small factor of x. More iterations could |
||
| 170 |
// get y in a tighter range. Currently, we will have y in [256, 256*2^16). |
||
| 171 |
// We ensured y >= 256 so that the relative difference between y and y+1 is small. |
||
| 172 |
// That's not possible if x < 256 but we can just verify those cases exhaustively. |
||
| 173 | |||
| 174 |
// Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256. |
||
| 175 |
// Correctness can be checked exhaustively for x < 256, so we assume y >= 256. |
||
| 176 |
// Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps. |
||
| 177 | |||
| 178 |
// For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range |
||
| 179 |
// (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256. |
||
| 180 | |||
| 181 |
// Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate |
||
| 182 |
// sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18. |
||
| 183 | |||
| 184 |
// There is no overflow risk here since y < 2^136 after the first branch above. |
||
| 185 |
√
|
z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181. |
|
| 186 | |||
| 187 |
// Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough. |
||
| 188 |
√
|
z := shr(1, add(z, div(x, z))) |
|
| 189 |
√
|
z := shr(1, add(z, div(x, z))) |
|
| 190 |
√
|
z := shr(1, add(z, div(x, z))) |
|
| 191 |
√
|
z := shr(1, add(z, div(x, z))) |
|
| 192 |
√
|
z := shr(1, add(z, div(x, z))) |
|
| 193 |
√
|
z := shr(1, add(z, div(x, z))) |
|
| 194 |
√
|
z := shr(1, add(z, div(x, z))) |
|
| 195 | |||
| 196 |
// If x+1 is a perfect square, the Babylonian method cycles between |
||
| 197 |
// floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor. |
||
| 198 |
// See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division |
||
| 199 |
// Since the ceil is rare, we save gas on the assignment and repeat division in the rare case. |
||
| 200 |
// If you don't care whether the floor or ceil square root is returned, you can remove this statement. |
||
| 201 |
√
|
z := sub(z, lt(div(x, z), z)) |
|
| 202 |
} |
||
| 203 |
} |
||
| 204 | |||
| 205 |
function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {
|
||
| 206 |
/// @solidity memory-safe-assembly |
||
| 207 |
assembly {
|
||
| 208 |
// Mod x by y. Note this will return |
||
| 209 |
// 0 instead of reverting if y is zero. |
||
| 210 |
z := mod(x, y) |
||
| 211 |
} |
||
| 212 |
} |
||
| 213 | |||
| 214 |
function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 r) {
|
||
| 215 |
/// @solidity memory-safe-assembly |
||
| 216 |
assembly {
|
||
| 217 |
// Divide x by y. Note this will return |
||
| 218 |
// 0 instead of reverting if y is zero. |
||
| 219 |
r := div(x, y) |
||
| 220 |
} |
||
| 221 |
} |
||
| 222 | |||
| 223 |
function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {
|
||
| 224 |
/// @solidity memory-safe-assembly |
||
| 225 |
assembly {
|
||
| 226 |
// Add 1 to x * y if x % y > 0. Note this will |
||
| 227 |
// return 0 instead of reverting if y is zero. |
||
| 228 |
z := add(gt(mod(x, y), 0), div(x, y)) |
||
| 229 |
} |
||
| 230 |
} |
||
| 231 |
} |
||
| 232 |
| Lines covered: | 2 / 2 (100.0%) |
|---|
| 1 |
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
||
| 2 | |||
| 3 |
√
|
⟳
|
contract MockERC20 is ERC20 {
|
| 4 |
constructor() ERC20("mock", "MOCK") {
|
||
| 5 |
√
|
_mint(msg.sender, 1_000_00000e18); |
|
| 6 |
} |
||
| 7 |
} |
| Lines covered: | 5 / 5 (100.0%) |
|---|
| 1 |
// SPDX-License-Identifier: UNLICENSED |
||
| 2 |
pragma solidity ^0.8.13; |
||
| 3 | |||
| 4 |
import {FixedPointMathLib} from "./FixedPointMathLib.sol";
|
||
| 5 | |||
| 6 |
√
|
contract OracleDemo {
|
|
| 7 |
// Lending Protocol |
||
| 8 |
// X Tokens |
||
| 9 |
// X * calculate_lp_token_price() |
||
| 10 | |||
| 11 |
// Little deposit -> Masive price = overborrow |
||
| 12 | |||
| 13 |
function calculate_lp_token_price( |
||
| 14 |
uint256 total_supply, |
||
| 15 |
uint256 price0, |
||
| 16 |
uint256 price1, |
||
| 17 |
uint256 reserve0, |
||
| 18 |
uint256 reserve1 |
||
| 19 |
√
|
) external pure returns (uint256) {
|
|
| 20 |
√
|
uint256 a = FixedPointMathLib.sqrt(reserve0 * reserve1); |
|
| 21 |
√
|
uint256 b = FixedPointMathLib.sqrt(price0 * price1); |
|
| 22 |
√
|
uint256 c = 2 * a * b / total_supply; |
|
| 23 | |||
| 24 |
return c; |
||
| 25 |
} |
||
| 26 |
} |
||
| 27 |
| Lines covered: | 120 / 201 (59.7%) |
|---|
| 1 |
// SPDX-License-Identifier: BUSL-1.1 |
||
| 2 |
pragma solidity 0.8.22; |
||
| 3 | |||
| 4 |
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
|
||
| 5 |
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
||
| 6 |
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
||
| 7 |
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||
| 8 |
import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";
|
||
| 9 |
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
|
||
| 10 | |||
| 11 |
/// @title Pool |
||
| 12 |
/// @author velodrome.finance, @figs999, @pegahcarter |
||
| 13 |
/// @notice Veldrome V2 token pool, either stable or volatile |
||
| 14 |
contract Pool is ERC20Permit, ReentrancyGuard {
|
||
| 15 |
using SafeERC20 for IERC20; |
||
| 16 | |||
| 17 |
string private _name; |
||
| 18 |
string private _symbol; |
||
| 19 |
address private _voter; |
||
| 20 | |||
| 21 |
/// IPool |
||
| 22 |
bool public stable; |
||
| 23 | |||
| 24 |
√
|
⟳
|
uint256 internal constant MINIMUM_LIQUIDITY = 10 ** 3; |
| 25 |
√
|
uint256 internal constant MINIMUM_K = 10 ** 10; |
|
| 26 | |||
| 27 |
/// IPool |
||
| 28 |
address public token0; |
||
| 29 |
/// IPool |
||
| 30 |
address public token1; |
||
| 31 |
/// IPool |
||
| 32 |
address public poolFees; |
||
| 33 |
/// IPool |
||
| 34 |
address public factory; |
||
| 35 | |||
| 36 |
/// IPool |
||
| 37 |
uint256 public constant periodSize = 1800; |
||
| 38 | |||
| 39 |
uint256 internal decimals0; |
||
| 40 |
uint256 internal decimals1; |
||
| 41 | |||
| 42 |
/// IPool |
||
| 43 |
√
|
uint256 public reserve0; |
|
| 44 |
/// IPool |
||
| 45 |
√
|
uint256 public reserve1; |
|
| 46 |
/// IPool |
||
| 47 |
uint256 public blockTimestampLast; |
||
| 48 | |||
| 49 |
/// IPool |
||
| 50 |
uint256 public reserve0CumulativeLast; |
||
| 51 |
/// IPool |
||
| 52 |
uint256 public reserve1CumulativeLast; |
||
| 53 | |||
| 54 |
/// IPool |
||
| 55 |
uint256 public index0; |
||
| 56 |
/// IPool |
||
| 57 |
uint256 public index1; |
||
| 58 | |||
| 59 |
/// IPool |
||
| 60 |
mapping(address => uint256) public supplyIndex0; |
||
| 61 |
/// IPool |
||
| 62 |
mapping(address => uint256) public supplyIndex1; |
||
| 63 | |||
| 64 |
/// IPool |
||
| 65 |
mapping(address => uint256) public claimable0; |
||
| 66 |
/// IPool |
||
| 67 |
mapping(address => uint256) public claimable1; |
||
| 68 | |||
| 69 |
√
|
constructor() ERC20("", "") ERC20Permit("") {}
|
|
| 70 | |||
| 71 |
/// IPool |
||
| 72 |
function initialize(address _token0, address _token1, bool _stable) external {
|
||
| 73 |
√
|
⟳
|
if (factory != address(0)) revert("FactoryAlreadySet()");
|
| 74 |
√
|
factory = msg.sender; |
|
| 75 |
√
|
_voter = msg.sender; |
|
| 76 |
√
|
(token0, token1, stable) = (_token0, _token1, _stable); |
|
| 77 |
√
|
poolFees = address(123); |
|
| 78 |
√
|
string memory symbol0 = ERC20(_token0).symbol(); |
|
| 79 |
√
|
string memory symbol1 = ERC20(_token1).symbol(); |
|
| 80 |
√
|
if (_stable) {
|
|
| 81 |
√
|
_name = string(abi.encodePacked("StableV2 AMM - ", symbol0, "/", symbol1));
|
|
| 82 |
√
|
_symbol = string(abi.encodePacked("sAMMV2-", symbol0, "/", symbol1));
|
|
| 83 |
} else {
|
||
| 84 |
_name = string(abi.encodePacked("VolatileV2 AMM - ", symbol0, "/", symbol1));
|
||
| 85 |
_symbol = string(abi.encodePacked("vAMMV2-", symbol0, "/", symbol1));
|
||
| 86 |
} |
||
| 87 | |||
| 88 |
√
|
decimals0 = 10 ** ERC20(_token0).decimals(); |
|
| 89 |
√
|
decimals1 = 10 ** ERC20(_token1).decimals(); |
|
| 90 |
} |
||
| 91 | |||
| 92 |
/// IPool |
||
| 93 |
function observationLength() external view returns (uint256) {
|
||
| 94 |
return 0; |
||
| 95 |
} |
||
| 96 | |||
| 97 | |||
| 98 |
/// IPool |
||
| 99 |
function metadata() |
||
| 100 |
external |
||
| 101 |
view |
||
| 102 |
returns (uint256 dec0, uint256 dec1, uint256 r0, uint256 r1, bool st, address t0, address t1) |
||
| 103 |
{
|
||
| 104 |
return (decimals0, decimals1, reserve0, reserve1, stable, token0, token1); |
||
| 105 |
} |
||
| 106 | |||
| 107 |
/// IPool |
||
| 108 |
function tokens() external view returns (address, address) {
|
||
| 109 |
return (token0, token1); |
||
| 110 |
} |
||
| 111 | |||
| 112 |
/// IPool |
||
| 113 |
√
|
function claimFees() external returns (uint256 claimed0, uint256 claimed1) {
|
|
| 114 |
√
|
_updateFor(msg.sender); |
|
| 115 | |||
| 116 |
√
|
claimed0 = claimable0[msg.sender]; |
|
| 117 |
√
|
claimed1 = claimable1[msg.sender]; |
|
| 118 | |||
| 119 |
√
|
if (claimed0 > 0 || claimed1 > 0) {
|
|
| 120 |
√
|
claimable0[msg.sender] = 0; |
|
| 121 |
√
|
claimable1[msg.sender] = 0; |
|
| 122 | |||
| 123 |
// emit Claim(msg.sender, msg.sender, claimed0, claimed1); |
||
| 124 |
} |
||
| 125 |
} |
||
| 126 | |||
| 127 |
/// @dev Accrue fees on token0 |
||
| 128 |
function _update0(uint256 amount) internal {
|
||
| 129 |
// Only update on this pool if there is a fee |
||
| 130 |
√
|
⟳
|
if (amount == 0) return; |
| 131 |
√
|
⟳
|
IERC20(token0).safeTransfer(poolFees, amount); // transfer the fees out to PoolFees |
| 132 |
√
|
⟳
|
uint256 _ratio = (amount * 1e18) / totalSupply(); // 1e18 adjustment is removed during claim |
| 133 |
√
|
⟳
|
if (_ratio > 0) {
|
| 134 |
√
|
⟳
|
index0 += _ratio; |
| 135 |
} |
||
| 136 |
// emit Fees(msg.sender, amount, 0); |
||
| 137 |
} |
||
| 138 | |||
| 139 |
/// @dev Accrue fees on token1 |
||
| 140 |
function _update1(uint256 amount) internal {
|
||
| 141 |
// Only update on this pool if there is a fee |
||
| 142 |
√
|
⟳
|
if (amount == 0) return; |
| 143 |
⟳
|
IERC20(token1).safeTransfer(poolFees, amount); |
|
| 144 |
⟳
|
uint256 _ratio = (amount * 1e18) / totalSupply(); |
|
| 145 |
⟳
|
if (_ratio > 0) {
|
|
| 146 |
⟳
|
index1 += _ratio; |
|
| 147 |
} |
||
| 148 |
// emit Fees(msg.sender, 0, amount); |
||
| 149 |
} |
||
| 150 | |||
| 151 |
/// @dev This function MUST be called on any balance changes, otherwise can be used to infinitely claim fees |
||
| 152 |
/// Fees are segregated from core funds, so fees can never put liquidity at risk. |
||
| 153 |
function _updateFor(address recipient) internal {
|
||
| 154 |
√
|
uint256 _supplied = balanceOf(recipient); // get LP balance of `recipient` |
|
| 155 |
√
|
if (_supplied > 0) {
|
|
| 156 |
√
|
uint256 _supplyIndex0 = supplyIndex0[recipient]; // get last adjusted index0 for recipient |
|
| 157 |
√
|
uint256 _supplyIndex1 = supplyIndex1[recipient]; |
|
| 158 |
√
|
uint256 _index0 = index0; // get global index0 for accumulated fees |
|
| 159 |
√
|
uint256 _index1 = index1; |
|
| 160 |
√
|
supplyIndex0[recipient] = _index0; // update user current position to global position |
|
| 161 |
√
|
supplyIndex1[recipient] = _index1; |
|
| 162 |
√
|
uint256 _delta0 = _index0 - _supplyIndex0; // see if there is any difference that need to be accrued |
|
| 163 |
√
|
uint256 _delta1 = _index1 - _supplyIndex1; |
|
| 164 |
√
|
if (_delta0 > 0) {
|
|
| 165 |
√
|
uint256 _share = (_supplied * _delta0) / 1e18; // add accrued difference for each supplied token |
|
| 166 |
√
|
claimable0[recipient] += _share; |
|
| 167 |
} |
||
| 168 |
√
|
if (_delta1 > 0) {
|
|
| 169 |
uint256 _share = (_supplied * _delta1) / 1e18; |
||
| 170 |
claimable1[recipient] += _share; |
||
| 171 |
} |
||
| 172 |
} else {
|
||
| 173 |
supplyIndex0[recipient] = index0; // new users are set to the default global state |
||
| 174 |
supplyIndex1[recipient] = index1; |
||
| 175 |
} |
||
| 176 |
} |
||
| 177 | |||
| 178 |
/// IPool |
||
| 179 |
function getReserves() public view returns (uint256 _reserve0, uint256 _reserve1, uint256 _blockTimestampLast) {
|
||
| 180 |
_reserve0 = reserve0; |
||
| 181 |
_reserve1 = reserve1; |
||
| 182 |
_blockTimestampLast = blockTimestampLast; |
||
| 183 |
} |
||
| 184 | |||
| 185 |
/// @dev update reserves and, on the first call per block, price accumulators |
||
| 186 |
function _update(uint256 balance0, uint256 balance1, uint256 _reserve0, uint256 _reserve1) internal {
|
||
| 187 |
√
|
uint256 blockTimestamp = block.timestamp; |
|
| 188 |
√
|
uint256 timeElapsed = blockTimestamp - blockTimestampLast; |
|
| 189 |
√
|
if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) {
|
|
| 190 |
√
|
reserve0CumulativeLast += _reserve0 * timeElapsed; |
|
| 191 |
√
|
reserve1CumulativeLast += _reserve1 * timeElapsed; |
|
| 192 |
} |
||
| 193 | |||
| 194 |
if (timeElapsed > periodSize) {
|
||
| 195 | |||
| 196 |
} |
||
| 197 |
√
|
reserve0 = balance0; |
|
| 198 |
√
|
reserve1 = balance1; |
|
| 199 |
√
|
blockTimestampLast = blockTimestamp; |
|
| 200 |
// emit Sync(reserve0, reserve1); |
||
| 201 |
} |
||
| 202 | |||
| 203 |
/// IPool |
||
| 204 |
function currentCumulativePrices() |
||
| 205 |
public |
||
| 206 |
view |
||
| 207 |
returns (uint256 reserve0Cumulative, uint256 reserve1Cumulative, uint256 blockTimestamp) |
||
| 208 |
{
|
||
| 209 |
blockTimestamp = block.timestamp; |
||
| 210 |
reserve0Cumulative = reserve0CumulativeLast; |
||
| 211 |
reserve1Cumulative = reserve1CumulativeLast; |
||
| 212 | |||
| 213 |
// if time has elapsed since the last update on the pool, mock the accumulated price values |
||
| 214 |
(uint256 _reserve0, uint256 _reserve1, uint256 _blockTimestampLast) = getReserves(); |
||
| 215 |
if (_blockTimestampLast != blockTimestamp) {
|
||
| 216 |
// subtraction overflow is desired |
||
| 217 |
uint256 timeElapsed = blockTimestamp - _blockTimestampLast; |
||
| 218 |
reserve0Cumulative += _reserve0 * timeElapsed; |
||
| 219 |
reserve1Cumulative += _reserve1 * timeElapsed; |
||
| 220 |
} |
||
| 221 |
} |
||
| 222 | |||
| 223 |
/// IPool |
||
| 224 |
√
|
⟳
|
function mint(address to) external nonReentrant returns (uint256 liquidity) {
|
| 225 |
√
|
⟳
|
(uint256 _reserve0, uint256 _reserve1) = (reserve0, reserve1); |
| 226 |
√
|
⟳
|
uint256 _balance0 = IERC20(token0).balanceOf(address(this)); |
| 227 |
√
|
⟳
|
uint256 _balance1 = IERC20(token1).balanceOf(address(this)); |
| 228 |
√
|
⟳
|
uint256 _amount0 = _balance0 - _reserve0; |
| 229 |
√
|
⟳
|
uint256 _amount1 = _balance1 - _reserve1; |
| 230 | |||
| 231 |
√
|
⟳
|
uint256 _totalSupply = totalSupply(); // gas savings, must be defined here since totalSupply can update in _mintFee |
| 232 |
√
|
⟳
|
if (_totalSupply == 0) {
|
| 233 |
√
|
liquidity = Math.sqrt(_amount0 * _amount1) - MINIMUM_LIQUIDITY; |
|
| 234 |
√
|
_mint(address(1), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens - cannot be address(0) |
|
| 235 |
√
|
if (stable) {
|
|
| 236 |
√
|
if ((_amount0 * 1e18) / decimals0 != (_amount1 * 1e18) / decimals1) revert("DepositsNotEqual()");
|
|
| 237 |
√
|
if (_k(_amount0, _amount1) <= MINIMUM_K) revert("BelowMinimumK()");
|
|
| 238 |
} |
||
| 239 |
} else {
|
||
| 240 |
⟳
|
liquidity = Math.min((_amount0 * _totalSupply) / _reserve0, (_amount1 * _totalSupply) / _reserve1); |
|
| 241 |
} |
||
| 242 |
√
|
⟳
|
if (liquidity < MINIMUM_LIQUIDITY) revert("InsufficientLiquidityMinted()");
|
| 243 |
√
|
_mint(to, liquidity); |
|
| 244 | |||
| 245 |
√
|
_update(_balance0, _balance1, _reserve0, _reserve1); |
|
| 246 |
// emit Mint(msg.sender, _amount0, _amount1); |
||
| 247 |
} |
||
| 248 | |||
| 249 |
/// IPool |
||
| 250 |
√
|
⟳
|
function burn(address to) external nonReentrant returns (uint256 amount0, uint256 amount1) {
|
| 251 |
√
|
⟳
|
(uint256 _reserve0, uint256 _reserve1) = (reserve0, reserve1); |
| 252 |
√
|
⟳
|
(address _token0, address _token1) = (token0, token1); |
| 253 |
√
|
⟳
|
uint256 _balance0 = IERC20(_token0).balanceOf(address(this)); |
| 254 |
√
|
⟳
|
uint256 _balance1 = IERC20(_token1).balanceOf(address(this)); |
| 255 |
√
|
⟳
|
uint256 _liquidity = balanceOf(address(this)); |
| 256 | |||
| 257 |
uint256 _totalSupply = totalSupply(); // gas savings, must be defined here since totalSupply can update in _mintFee |
||
| 258 |
√
|
⟳
|
amount0 = (_liquidity * _balance0) / _totalSupply; // using balances ensures pro-rata distribution |
| 259 |
√
|
⟳
|
amount1 = (_liquidity * _balance1) / _totalSupply; // using balances ensures pro-rata distribution |
| 260 |
√
|
⟳
|
if (amount0 == 0 || amount1 == 0) revert("InsufficientLiquidityBurned()");
|
| 261 |
√
|
_burn(address(this), _liquidity); |
|
| 262 |
√
|
IERC20(_token0).safeTransfer(to, amount0); |
|
| 263 |
√
|
IERC20(_token1).safeTransfer(to, amount1); |
|
| 264 |
√
|
_balance0 = IERC20(_token0).balanceOf(address(this)); |
|
| 265 |
√
|
_balance1 = IERC20(_token1).balanceOf(address(this)); |
|
| 266 | |||
| 267 |
√
|
_update(_balance0, _balance1, _reserve0, _reserve1); |
|
| 268 |
// emit Burn(msg.sender, to, amount0, amount1); |
||
| 269 |
} |
||
| 270 | |||
| 271 |
/// IPool |
||
| 272 |
function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external nonReentrant {
|
||
| 273 |
// if (IPoolFactory(factory).isPaused()) revert("IsPaused()");
|
||
| 274 |
√
|
⟳
|
if (amount0Out == 0 && amount1Out == 0) revert("InsufficientOutputAmount()");
|
| 275 |
√
|
⟳
|
(uint256 _reserve0, uint256 _reserve1) = (reserve0, reserve1); |
| 276 |
√
|
⟳
|
if (amount0Out >= _reserve0 || amount1Out >= _reserve1) revert("InsufficientLiquidity()");
|
| 277 | |||
| 278 |
√
|
⟳
|
uint256 _balance0; |
| 279 |
uint256 _balance1; |
||
| 280 |
{
|
||
| 281 |
// scope for _token{0,1}, avoids stack too deep errors
|
||
| 282 |
√
|
⟳
|
(address _token0, address _token1) = (token0, token1); |
| 283 |
√
|
⟳
|
if (to == _token0 || to == _token1) revert("InvalidTo()");
|
| 284 |
√
|
⟳
|
if (amount0Out > 0) IERC20(_token0).safeTransfer(to, amount0Out); // optimistically transfer tokens |
| 285 |
√
|
⟳
|
if (amount1Out > 0) IERC20(_token1).safeTransfer(to, amount1Out); // optimistically transfer tokens |
| 286 |
√
|
⟳
|
_balance0 = IERC20(_token0).balanceOf(address(this)); |
| 287 |
√
|
⟳
|
_balance1 = IERC20(_token1).balanceOf(address(this)); |
| 288 |
} |
||
| 289 |
√
|
⟳
|
uint256 amount0In = _balance0 > _reserve0 - amount0Out ? _balance0 - (_reserve0 - amount0Out) : 0; |
| 290 |
√
|
⟳
|
uint256 amount1In = _balance1 > _reserve1 - amount1Out ? _balance1 - (_reserve1 - amount1Out) : 0; |
| 291 |
√
|
⟳
|
if (amount0In == 0 && amount1In == 0) revert("InsufficientInputAmount()");
|
| 292 |
{
|
||
| 293 |
// scope for reserve{0,1}Adjusted, avoids stack too deep errors
|
||
| 294 |
√
|
⟳
|
(address _token0, address _token1) = (token0, token1); |
| 295 |
√
|
⟳
|
if (amount0In > 0) _update0(amount0In * 5 / 10000); // accrue fees for token0 and move them out of pool |
| 296 |
√
|
⟳
|
if (amount1In > 0) _update1(amount1In * 5 / 10000); // accrue fees for token1 and move them out of pool |
| 297 |
√
|
⟳
|
_balance0 = IERC20(_token0).balanceOf(address(this)); // since we removed tokens, we need to reconfirm balances, can also simply use previous balance - amountIn/ 10000, but doing balanceOf again as safety check |
| 298 |
√
|
⟳
|
_balance1 = IERC20(_token1).balanceOf(address(this)); |
| 299 |
// The curve, either x3y+y3x for stable pools, or x*y for volatile pools |
||
| 300 |
√
|
⟳
|
if (_k(_balance0, _balance1) < _k(_reserve0, _reserve1)) revert("K()");
|
| 301 |
} |
||
| 302 | |||
| 303 |
√
|
_update(_balance0, _balance1, _reserve0, _reserve1); |
|
| 304 |
// emit Swap(msg.sender, to, amount0In, amount1In, amount0Out, amount1Out); |
||
| 305 |
} |
||
| 306 | |||
| 307 |
/// IPool |
||
| 308 |
function skim(address to) external nonReentrant {
|
||
| 309 |
√
|
⟳
|
(address _token0, address _token1) = (token0, token1); |
| 310 |
√
|
⟳
|
IERC20(_token0).safeTransfer(to, IERC20(_token0).balanceOf(address(this)) - (reserve0)); |
| 311 |
√
|
IERC20(_token1).safeTransfer(to, IERC20(_token1).balanceOf(address(this)) - (reserve1)); |
|
| 312 |
} |
||
| 313 | |||
| 314 |
/// IPool |
||
| 315 |
function sync() external nonReentrant {
|
||
| 316 |
√
|
if (totalSupply() == 0) revert("InsufficientLiquidity()");
|
|
| 317 |
√
|
_update(IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)), reserve0, reserve1); |
|
| 318 |
} |
||
| 319 | |||
| 320 |
function _f(uint256 x0, uint256 y) internal pure returns (uint256) {
|
||
| 321 |
uint256 _a = (x0 * y) / 1e18; |
||
| 322 |
uint256 _b = ((x0 * x0) / 1e18 + (y * y) / 1e18); |
||
| 323 |
return (_a * _b) / 1e18; |
||
| 324 |
} |
||
| 325 | |||
| 326 |
function _d(uint256 x0, uint256 y) internal pure returns (uint256) {
|
||
| 327 |
return (3 * x0 * ((y * y) / 1e18)) / 1e18 + ((((x0 * x0) / 1e18) * x0) / 1e18); |
||
| 328 |
} |
||
| 329 | |||
| 330 |
function _get_y(uint256 x0, uint256 xy, uint256 y) internal view returns (uint256) {
|
||
| 331 |
for (uint256 i = 0; i < 255; i++) {
|
||
| 332 |
uint256 k = _f(x0, y); |
||
| 333 |
if (k < xy) {
|
||
| 334 |
// there are two cases where dy == 0 |
||
| 335 |
// case 1: The y is converged and we find the correct answer |
||
| 336 |
// case 2: _d(x0, y) is too large compare to (xy - k) and the rounding error |
||
| 337 |
// screwed us. |
||
| 338 |
// In this case, we need to increase y by 1 |
||
| 339 |
uint256 dy = ((xy - k) * 1e18) / _d(x0, y); |
||
| 340 |
if (dy == 0) {
|
||
| 341 |
if (k == xy) {
|
||
| 342 |
// We found the correct answer. Return y |
||
| 343 |
return y; |
||
| 344 |
} |
||
| 345 |
if (_k(x0, y + 1) > xy) {
|
||
| 346 |
// If _k(x0, y + 1) > xy, then we are close to the correct answer. |
||
| 347 |
// There's no closer answer than y + 1 |
||
| 348 |
return y + 1; |
||
| 349 |
} |
||
| 350 |
dy = 1; |
||
| 351 |
} |
||
| 352 |
y = y + dy; |
||
| 353 |
} else {
|
||
| 354 |
uint256 dy = ((k - xy) * 1e18) / _d(x0, y); |
||
| 355 |
if (dy == 0) {
|
||
| 356 |
if (k == xy || _f(x0, y - 1) < xy) {
|
||
| 357 |
// Likewise, if k == xy, we found the correct answer. |
||
| 358 |
// If _f(x0, y - 1) < xy, then we are close to the correct answer. |
||
| 359 |
// There's no closer answer than "y" |
||
| 360 |
// It's worth mentioning that we need to find y where f(x0, y) >= xy |
||
| 361 |
// As a result, we can't return y - 1 even it's closer to the correct answer |
||
| 362 |
return y; |
||
| 363 |
} |
||
| 364 |
dy = 1; |
||
| 365 |
} |
||
| 366 |
y = y - dy; |
||
| 367 |
} |
||
| 368 |
} |
||
| 369 |
revert("!y");
|
||
| 370 |
} |
||
| 371 | |||
| 372 |
/// IPool |
||
| 373 |
// NOTE: Fees hardcoded to 5 bps |
||
| 374 |
function getAmountOut(uint256 amountIn, address tokenIn) external view returns (uint256) {
|
||
| 375 |
(uint256 _reserve0, uint256 _reserve1) = (reserve0, reserve1); |
||
| 376 |
amountIn -= (amountIn * 5) / 10000; // remove fee from amount received |
||
| 377 |
return _getAmountOut(amountIn, tokenIn, _reserve0, _reserve1); |
||
| 378 |
} |
||
| 379 | |||
| 380 |
function _getAmountOut( |
||
| 381 |
uint256 amountIn, |
||
| 382 |
address tokenIn, |
||
| 383 |
uint256 _reserve0, |
||
| 384 |
uint256 _reserve1 |
||
| 385 |
) internal view returns (uint256) {
|
||
| 386 |
if (stable) {
|
||
| 387 |
uint256 xy = _k(_reserve0, _reserve1); |
||
| 388 |
_reserve0 = (_reserve0 * 1e18) / decimals0; |
||
| 389 |
_reserve1 = (_reserve1 * 1e18) / decimals1; |
||
| 390 |
(uint256 reserveA, uint256 reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); |
||
| 391 |
amountIn = tokenIn == token0 ? (amountIn * 1e18) / decimals0 : (amountIn * 1e18) / decimals1; |
||
| 392 |
uint256 y = reserveB - _get_y(amountIn + reserveA, xy, reserveB); |
||
| 393 |
return (y * (tokenIn == token0 ? decimals1 : decimals0)) / 1e18; |
||
| 394 |
} else {
|
||
| 395 |
(uint256 reserveA, uint256 reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); |
||
| 396 |
return (amountIn * reserveB) / (reserveA + amountIn); |
||
| 397 |
} |
||
| 398 |
} |
||
| 399 | |||
| 400 |
√
|
⟳
|
function _k(uint256 x, uint256 y) internal view returns (uint256) {
|
| 401 |
√
|
⟳
|
if (stable) {
|
| 402 |
√
|
⟳
|
uint256 _x = (x * 1e18) / decimals0; |
| 403 |
√
|
⟳
|
uint256 _y = (y * 1e18) / decimals1; |
| 404 |
√
|
⟳
|
uint256 _a = (_x * _y) / 1e18; |
| 405 |
√
|
⟳
|
uint256 _b = ((_x * _x) / 1e18 + (_y * _y) / 1e18); |
| 406 |
√
|
⟳
|
return (_a * _b) / 1e18; // x3y+y3x >= k |
| 407 |
} else {
|
||
| 408 |
return x * y; // xy >= k |
||
| 409 |
} |
||
| 410 |
} |
||
| 411 | |||
| 412 |
/* |
||
| 413 |
@dev OZ inheritance overrides |
||
| 414 |
These are needed as _name and _symbol are set privately before |
||
| 415 |
logic is executed within the constructor to set _name and _symbol. |
||
| 416 |
*/ |
||
| 417 |
function name() public view override returns (string memory) {
|
||
| 418 |
return _name; |
||
| 419 |
} |
||
| 420 | |||
| 421 |
function symbol() public view override returns (string memory) {
|
||
| 422 |
return _symbol; |
||
| 423 |
} |
||
| 424 | |||
| 425 |
function _beforeTokenTransfer(address from, address to, uint256) internal {
|
||
| 426 |
_updateFor(from); |
||
| 427 |
_updateFor(to); |
||
| 428 |
} |
||
| 429 |
} |
| Lines covered: | 0 / 64 (0.0%) |
|---|
| 1 |
// SPDX-License-Identifier: UNLICENSED |
||
| 2 |
pragma solidity ^0.8.13; |
||
| 3 | |||
| 4 |
import {Test, console} from "forge-std/Test.sol";
|
||
| 5 |
import {console2} from "forge-std/console2.sol";
|
||
| 6 |
import {OracleDemo} from "src/OracleDemo.sol";
|
||
| 7 |
import {MockERC20} from "src/MockERC20.sol";
|
||
| 8 |
import {Pool} from "src/Pool.sol";
|
||
| 9 | |||
| 10 |
contract OracleTest is Test {
|
||
| 11 |
function testDemoOracle() public {
|
||
| 12 |
OracleDemo oracle = new OracleDemo(); |
||
| 13 |
// We'll assume that they are priced at 1:1 |
||
| 14 |
MockERC20 tokenA = new MockERC20(); |
||
| 15 |
MockERC20 tokenB = new MockERC20(); |
||
| 16 | |||
| 17 |
Pool pool = new Pool(); |
||
| 18 |
// Classic unstable Pool |
||
| 19 |
pool.initialize(address(tokenA), address(tokenB), false); |
||
| 20 | |||
| 21 |
// Set the pool at 1:1 |
||
| 22 |
tokenA.transfer(address(pool), 1e18); |
||
| 23 |
tokenB.transfer(address(pool), 1e18); |
||
| 24 | |||
| 25 |
pool.mint(address(this)); |
||
| 26 | |||
| 27 |
console.log("pool.balanceOf(address(this))", pool.balanceOf(address(this)));
|
||
| 28 | |||
| 29 |
uint256 totalSupply = pool.totalSupply(); |
||
| 30 |
// From oracle |
||
| 31 |
uint256 price0 = 1e18; |
||
| 32 |
uint256 price1 = 1e18; |
||
| 33 | |||
| 34 |
uint256 reserve0 = pool.reserve0(); |
||
| 35 |
uint256 reserve1 = pool.reserve1(); |
||
| 36 | |||
| 37 | |||
| 38 |
// // 2 brute force way |
||
| 39 | |||
| 40 |
// // Deploy a pool with tokens |
||
| 41 |
// // Swap stufs |
||
| 42 |
// // See whether we can make the price change |
||
| 43 | |||
| 44 |
|
||
| 45 | |||
| 46 |
console2.log( |
||
| 47 |
"calculate_lp_token_price", |
||
| 48 |
oracle.calculate_lp_token_price(totalSupply, price0, price1, reserve0, reserve1) |
||
| 49 |
); |
||
| 50 |
} |
||
| 51 | |||
| 52 |
function testDemoOracleAttack() public {
|
||
| 53 |
OracleDemo oracle = new OracleDemo(); |
||
| 54 |
// We'll assume that they are priced at 1:1 |
||
| 55 |
MockERC20 tokenA = new MockERC20(); |
||
| 56 |
MockERC20 tokenB = new MockERC20(); |
||
| 57 | |||
| 58 |
Pool pool = new Pool(); |
||
| 59 |
// Classic unstable Pool |
||
| 60 |
pool.initialize(address(tokenA), address(tokenB), false); |
||
| 61 | |||
| 62 |
// Set the pool at 1:1 |
||
| 63 |
tokenA.transfer(address(pool), 1000e18); |
||
| 64 |
tokenB.transfer(address(pool), 1000e18); |
||
| 65 | |||
| 66 |
pool.mint(address(this)); |
||
| 67 | |||
| 68 |
console.log("pool.balanceOf(address(this))", pool.balanceOf(address(this)));
|
||
| 69 | |||
| 70 |
tokenA.transfer(address(pool), 1_000e18); |
||
| 71 |
pool.swap(0, 1e18 * 99 / 100, address(this), hex""); |
||
| 72 |
pool.skim(address(this)); |
||
| 73 | |||
| 74 |
uint256 totalSupply = pool.totalSupply(); |
||
| 75 |
// From oracle |
||
| 76 |
uint256 price0 = 1e18; |
||
| 77 |
uint256 price1 = 1e18; |
||
| 78 | |||
| 79 |
uint256 reserve0 = pool.reserve0(); |
||
| 80 |
uint256 reserve1 = pool.reserve1(); |
||
| 81 | |||
| 82 | |||
| 83 |
// // 2 brute force way |
||
| 84 | |||
| 85 |
// // Deploy a pool with tokens |
||
| 86 |
// // Swap stufs |
||
| 87 |
// // See whether we can make the price change |
||
| 88 | |||
| 89 |
console2.log( |
||
| 90 |
"calculate_lp_token_price", |
||
| 91 |
oracle.calculate_lp_token_price(totalSupply, price0, price1, reserve0, reserve1) |
||
| 92 |
); |
||
| 93 |
} |
||
| 94 |
function testDemoOracleAttackStable(uint256 amt) public {
|
||
| 95 |
OracleDemo oracle = new OracleDemo(); |
||
| 96 |
// We'll assume that they are priced at 1:1 |
||
| 97 |
MockERC20 tokenA = new MockERC20(); |
||
| 98 |
MockERC20 tokenB = new MockERC20(); |
||
| 99 | |||
| 100 |
Pool pool = new Pool(); |
||
| 101 |
// Classic unstable Pool |
||
| 102 |
pool.initialize(address(tokenA), address(tokenB), false); |
||
| 103 | |||
| 104 |
// Set the pool at 1:1 |
||
| 105 |
tokenA.transfer(address(pool), 1000e18); |
||
| 106 |
tokenB.transfer(address(pool), 1000e18); |
||
| 107 | |||
| 108 |
pool.mint(address(this)); |
||
| 109 | |||
| 110 |
console.log("pool.balanceOf(address(this))", pool.balanceOf(address(this)));
|
||
| 111 | |||
| 112 |
tokenA.transfer(address(pool), 1_000000e18); |
||
| 113 |
pool.swap(0, amt * 99 / 100, address(this), hex""); |
||
| 114 |
pool.skim(address(this)); |
||
| 115 | |||
| 116 |
uint256 totalSupply = pool.totalSupply(); |
||
| 117 |
// From oracle |
||
| 118 |
uint256 price0 = 1e18; |
||
| 119 |
uint256 price1 = 1e18; |
||
| 120 | |||
| 121 |
uint256 reserve0 = pool.reserve0(); |
||
| 122 |
uint256 reserve1 = pool.reserve1(); |
||
| 123 | |||
| 124 | |||
| 125 |
// // 2 brute force way |
||
| 126 | |||
| 127 |
// // Deploy a pool with tokens |
||
| 128 |
// // Swap stufs |
||
| 129 |
// // See whether we can make the price change |
||
| 130 | |||
| 131 |
console2.log( |
||
| 132 |
"calculate_lp_token_price", |
||
| 133 |
oracle.calculate_lp_token_price(totalSupply, price0, price1, reserve0, reserve1) |
||
| 134 |
); |
||
| 135 | |||
| 136 | |||
| 137 |
uint256 price = oracle.calculate_lp_token_price(totalSupply, price0, price1, reserve0, reserve1); |
||
| 138 | |||
| 139 | |||
| 140 |
uint256 balB4 = pool.balanceOf(address(this)); |
||
| 141 |
uint256 snapshot = vm.snapshot(); |
||
| 142 |
tokenA.transfer(address(pool), 2826673306202894044); |
||
| 143 |
tokenB.transfer(address(pool), 2826673306202894044); |
||
| 144 | |||
| 145 |
pool.mint(address(this)); |
||
| 146 |
uint256 balAfter = pool.balanceOf(address(this)); |
||
| 147 |
uint256 change = balAfter - balB4; |
||
| 148 |
console2.log("change", change);
|
||
| 149 |
} |
||
| 150 |
} |
||
| 151 |
| Lines covered: | 0 / 0 (0.0%) |
|---|
| 1 | |||
| 2 |
// SPDX-License-Identifier: GPL-2.0 |
||
| 3 |
pragma solidity ^0.8.0; |
||
| 4 | |||
| 5 |
import {Setup} from "./Setup.sol";
|
||
| 6 | |||
| 7 |
abstract contract BeforeAfter is Setup {
|
||
| 8 | |||
| 9 |
} |
||
| 10 |
| Lines covered: | 2 / 2 (100.0%) |
|---|
| 1 | |||
| 2 |
// SPDX-License-Identifier: GPL-2.0 |
||
| 3 |
pragma solidity ^0.8.0; |
||
| 4 | |||
| 5 |
import {TargetFunctions} from "./TargetFunctions.sol";
|
||
| 6 |
import {CryticAsserts} from "@chimera/CryticAsserts.sol";
|
||
| 7 | |||
| 8 |
// echidna . --contract CryticTester --config echidna.yaml |
||
| 9 |
// medusa fuzz |
||
| 10 |
√
|
⟳
|
contract CryticTester is TargetFunctions, CryticAsserts {
|
| 11 |
constructor() payable {
|
||
| 12 |
√
|
setup(); |
|
| 13 |
} |
||
| 14 |
} |
||
| 15 |
| Lines covered: | 0 / 2 (0.0%) |
|---|
| 1 | |||
| 2 |
// SPDX-License-Identifier: GPL-2.0 |
||
| 3 |
pragma solidity ^0.8.0; |
||
| 4 | |||
| 5 |
import {Test} from "forge-std/Test.sol";
|
||
| 6 |
import {TargetFunctions} from "./TargetFunctions.sol";
|
||
| 7 |
import {FoundryAsserts} from "@chimera/FoundryAsserts.sol";
|
||
| 8 | |||
| 9 |
contract CryticToFoundry is Test, TargetFunctions, FoundryAsserts {
|
||
| 10 |
function setUp() public {
|
||
| 11 |
setup(); |
||
| 12 |
} |
||
| 13 | |||
| 14 |
function testDemo() public {
|
||
| 15 |
// TODO: Given any target function and foundry assert, test your results |
||
| 16 |
} |
||
| 17 |
} |
||
| 18 |
| Lines covered: | 0 / 2 (0.0%) |
|---|
| 1 | |||
| 2 |
// SPDX-License-Identifier: GPL-2.0 |
||
| 3 |
pragma solidity ^0.8.0; |
||
| 4 | |||
| 5 |
import {Asserts} from "@chimera/Asserts.sol";
|
||
| 6 |
import {Setup} from "./Setup.sol";
|
||
| 7 | |||
| 8 |
abstract contract Properties is Setup, Asserts {
|
||
| 9 | |||
| 10 |
function crytic_price_cannot_change() public view returns (bool) {
|
||
| 11 |
return initialPrice == oracleDemo.calculate_lp_token_price(pool.totalSupply(), price0, price1, pool.reserve0(), pool.reserve1()); |
||
| 12 |
} |
||
| 13 |
} |
||
| 14 |
| Lines covered: | 11 / 11 (100.0%) |
|---|
| 1 | |||
| 2 |
// SPDX-License-Identifier: GPL-2.0 |
||
| 3 |
pragma solidity ^0.8.0; |
||
| 4 | |||
| 5 |
import {BaseSetup} from "@chimera/BaseSetup.sol";
|
||
| 6 | |||
| 7 |
import "src/OracleDemo.sol"; |
||
| 8 |
import "src/Pool.sol"; |
||
| 9 |
import "src/MockERC20.sol"; |
||
| 10 | |||
| 11 |
abstract contract Setup is BaseSetup {
|
||
| 12 | |||
| 13 |
Pool pool; |
||
| 14 |
OracleDemo oracleDemo; |
||
| 15 |
MockERC20 tokenA; |
||
| 16 |
MockERC20 tokenB; |
||
| 17 | |||
| 18 |
uint256 initialPrice; |
||
| 19 | |||
| 20 |
√
|
uint256 price0 = 1e18; |
|
| 21 |
√
|
uint256 price1 = 1e18; |
|
| 22 | |||
| 23 |
function setup() internal virtual override {
|
||
| 24 |
√
|
pool = new Pool(); |
|
| 25 |
√
|
oracleDemo = new OracleDemo(); |
|
| 26 | |||
| 27 |
√
|
tokenA = new MockERC20(); |
|
| 28 |
√
|
tokenB = new MockERC20(); |
|
| 29 | |||
| 30 |
// Classic unstable Pool |
||
| 31 |
√
|
pool.initialize(address(tokenA), address(tokenB), true); |
|
| 32 | |||
| 33 |
// Set the pool at 1:1 |
||
| 34 |
√
|
tokenA.transfer(address(pool), 1000e18); |
|
| 35 |
√
|
tokenB.transfer(address(pool), 1000e18); |
|
| 36 | |||
| 37 |
√
|
pool.mint(address(this)); |
|
| 38 | |||
| 39 |
√
|
initialPrice = oracleDemo.calculate_lp_token_price(pool.totalSupply(), price0, price1, pool.reserve0(), pool.reserve1()); |
|
| 40 | |||
| 41 |
} |
||
| 42 |
} |
||
| 43 |
| Lines covered: | 12 / 12 (100.0%) |
|---|
| 1 | |||
| 2 |
// SPDX-License-Identifier: GPL-2.0 |
||
| 3 |
pragma solidity ^0.8.0; |
||
| 4 | |||
| 5 |
import {BaseTargetFunctions} from "@chimera/BaseTargetFunctions.sol";
|
||
| 6 |
import {BeforeAfter} from "./BeforeAfter.sol";
|
||
| 7 |
import {Properties} from "./Properties.sol";
|
||
| 8 |
import {vm} from "@chimera/Hevm.sol";
|
||
| 9 | |||
| 10 |
abstract contract TargetFunctions is BaseTargetFunctions, Properties, BeforeAfter {
|
||
| 11 | |||
| 12 |
function pool_approve(address spender, uint256 value) public {
|
||
| 13 |
√
|
⟳
|
pool.approve(spender, value); |
| 14 |
} |
||
| 15 | |||
| 16 |
function pool_burn(address to) public {
|
||
| 17 |
√
|
⟳
|
pool.burn(to); |
| 18 |
} |
||
| 19 | |||
| 20 |
function pool_claimFees() public {
|
||
| 21 |
√
|
pool.claimFees(); |
|
| 22 |
} |
||
| 23 | |||
| 24 |
function pool_initialize(address _token0, address _token1, bool _stable) public {
|
||
| 25 |
⟳
|
pool.initialize(_token0, _token1, _stable); |
|
| 26 |
} |
||
| 27 | |||
| 28 |
function donateToPool0(uint256 amt) public {
|
||
| 29 |
√
|
⟳
|
tokenA.transfer(address(pool), amt); |
| 30 |
} |
||
| 31 | |||
| 32 |
function pool_mint(address to) public {
|
||
| 33 |
⟳
|
pool.mint(to); |
|
| 34 |
} |
||
| 35 | |||
| 36 |
function pool_permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
|
||
| 37 |
⟳
|
pool.permit(owner, spender, value, deadline, v, r, s); |
|
| 38 |
} |
||
| 39 | |||
| 40 |
function pool_skim(address to) public {
|
||
| 41 |
√
|
⟳
|
pool.skim(to); |
| 42 |
} |
||
| 43 | |||
| 44 |
function pool_swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) public {
|
||
| 45 |
√
|
⟳
|
pool.swap(amount0Out, amount1Out, to, data); |
| 46 |
} |
||
| 47 | |||
| 48 |
function pool_sync() public {
|
||
| 49 |
√
|
pool.sync(); |
|
| 50 |
} |
||
| 51 | |||
| 52 |
function pool_transfer(address to, uint256 value) public {
|
||
| 53 |
√
|
⟳
|
pool.transfer(to, value); |
| 54 |
} |
||
| 55 | |||
| 56 |
function pool_transferFrom(address from, address to, uint256 value) public {
|
||
| 57 |
√
|
⟳
|
pool.transferFrom(from, to, value); |
| 58 |
} |
||
| 59 | |||
| 60 |
} |
||
| 61 |